]> git.saurik.com Git - android/aapt.git/commitdiff
Make StringPool entry types trivially movable.
authorJeff Brown <jeffbrown@google.com>
Fri, 16 Mar 2012 22:24:32 +0000 (15:24 -0700)
committerJeff Brown <jeffbrown@google.com>
Fri, 16 Mar 2012 22:24:32 +0000 (15:24 -0700)
Change-Id: If93957a840a0f1cae2e6ef291eeeb1b0c7c20958

StringPool.h

index 86044ed1ad2b2bb0a278294ca3a7d13d68623b84..ef86528039498785f87e3df2411d648182e2051f 100644 (file)
@@ -13,6 +13,7 @@
 #include <androidfw/ResourceTypes.h>
 #include <utils/String16.h>
 #include <utils/TextOutput.h>
+#include <utils/TypeHelpers.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -193,5 +194,13 @@ private:
     Vector<size_t>                          mOriginalPosToNewPos;
 };
 
+// The entry types are trivially movable because all fields they contain, including
+// the vectors and strings, are trivially movable.
+namespace android {
+    ANDROID_TRIVIAL_MOVE_TRAIT(StringPool::entry);
+    ANDROID_TRIVIAL_MOVE_TRAIT(StringPool::entry_style_span);
+    ANDROID_TRIVIAL_MOVE_TRAIT(StringPool::entry_style);
+};
+
 #endif