summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2013-05-31 03:31:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-31 03:31:49 +0000
commitae4d9dd0dac927c335b5ea88097aa61e8276fcda (patch)
tree81a124a2f6d3dfb841f488aa9b3e3faa52036f5c /include
parentd85879a81903daefeb709c6e247c7dc4d621eec3 (diff)
parent24beb02a7a6ce11d1805d9142748523ddbcdd0a7 (diff)
downloadframeworks_native-ae4d9dd0dac927c335b5ea88097aa61e8276fcda.zip
frameworks_native-ae4d9dd0dac927c335b5ea88097aa61e8276fcda.tar.gz
frameworks_native-ae4d9dd0dac927c335b5ea88097aa61e8276fcda.tar.bz2
Merge "Added bitwise-or and bitwise-and to BitSet"
Diffstat (limited to 'include')
-rw-r--r--include/utils/BitSet.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/utils/BitSet.h b/include/utils/BitSet.h
index e189d0c..19c03d1 100644
--- a/include/utils/BitSet.h
+++ b/include/utils/BitSet.h
@@ -101,6 +101,20 @@ struct BitSet32 {
inline bool operator== (const BitSet32& other) const { return value == other.value; }
inline bool operator!= (const BitSet32& other) const { return value != other.value; }
+ inline BitSet32 operator& (const BitSet32& other) const {
+ return BitSet32(value & other.value);
+ }
+ inline BitSet32& operator&= (const BitSet32& other) {
+ value &= other.value;
+ return *this;
+ }
+ inline BitSet32 operator| (const BitSet32& other) const {
+ return BitSet32(value | other.value);
+ }
+ inline BitSet32& operator|= (const BitSet32& other) {
+ value |= other.value;
+ return *this;
+ }
};
ANDROID_BASIC_TYPES_TRAITS(BitSet32)