From e6d77c593d1a25b45c23bf9292ec7ee09fc14b6e Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 16 Mar 2012 14:45:49 -0700 Subject: 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 --- include/utils/BitSet.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/utils/BitSet.h') 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 +#include /* * 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 -- cgit v1.2.3-59-g8ed1b