summaryrefslogtreecommitdiff
path: root/include/utils/BitSet.h
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2012-03-16 14:45:49 -0700
committer Jeff Brown <jeffbrown@google.com> 2012-03-16 16:21:21 -0700
commite6d77c593d1a25b45c23bf9292ec7ee09fc14b6e (patch)
tree7246b3be522780008cf90a2ce112bd70c52e344d /include/utils/BitSet.h
parent599ebfd48d43933e2edcfd4f18a0b1a9a9d7ff38 (diff)
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 9452e86d61..e189d0c73d 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