summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-09-27 12:33:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-27 12:33:14 -0700
commit14a288da6a372230d9af41da12241fe500eec837 (patch)
tree2a15d375323bce1a89d48279ef228650550e8414 /include/utils
parent524ae7dd149c6b10814282dc3e2e55a4f755ad29 (diff)
parent01ce2e9eee41cc0c24b0d16465710a28ea337d5d (diff)
downloadframeworks_base-14a288da6a372230d9af41da12241fe500eec837.zip
frameworks_base-14a288da6a372230d9af41da12241fe500eec837.tar.gz
frameworks_base-14a288da6a372230d9af41da12241fe500eec837.tar.bz2
Merge "Add suuport for splitting touch events across windows." into gingerbread
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/BitSet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/utils/BitSet.h b/include/utils/BitSet.h
index 19c8bf0..f5dbcd9 100644
--- a/include/utils/BitSet.h
+++ b/include/utils/BitSet.h
@@ -38,6 +38,9 @@ struct BitSet32 {
// Clears the bit set.
inline void clear() { value = 0; }
+ // Returns the number of marked bits in the set.
+ inline uint32_t count() const { return __builtin_popcount(value); }
+
// Returns true if the bit set does not contain any marked bits.
inline bool isEmpty() const { return ! value; }