summaryrefslogtreecommitdiffstats
path: root/include/utils/BitSet.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-03-16 14:45:49 -0700
committerAlex Ray <aray@google.com>2013-07-30 13:56:59 -0700
commit9a0a76df1e961ef4621e81814d8bf891a09bef66 (patch)
tree63436edb3bec6bb1160dd3cdcc8a97cb1a01237c /include/utils/BitSet.h
parenta19d2c7e3bf4aadad064163029bccf3f03c300cb (diff)
downloadcore-9a0a76df1e961ef4621e81814d8bf891a09bef66.tar.gz
core-9a0a76df1e961ef4621e81814d8bf891a09bef66.tar.bz2
core-9a0a76df1e961ef4621e81814d8bf891a09bef66.zip
Add traits to common utils data structures.
Many of our basic data structures are trivially movable using memcpy() even if they are not trivially constructable, destructable or copyable. It's worth taking advantage of this *ahem* trait. Adding trivial_move_trait to String16 reduces appt running time on frameworks/base/core/res by 40%! Change-Id: I630a1a027e2d0ded96856e4ca042ea82906289fe
Diffstat (limited to 'include/utils/BitSet.h')
-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 9452e86d6..e189d0c73 100644
--- a/include/utils/BitSet.h
+++ b/include/utils/BitSet.h
@@ -18,6 +18,7 @@
#define UTILS_BITSET_H
#include <stdint.h>
+#include <utils/TypeHelpers.h>
/*
* Contains some bit manipulation helpers.
@@ -102,6 +103,8 @@ struct BitSet32 {
inline bool operator!= (const BitSet32& other) const { return value != other.value; }
};
+ANDROID_BASIC_TYPES_TRAITS(BitSet32)
+
} // namespace android
#endif // UTILS_BITSET_H