Skip to content

Commit 8a9cfcc

Browse files
author
Jeff Brown
committed
Make StringPool entry types trivially movable.
Change-Id: If93957a840a0f1cae2e6ef291eeeb1b0c7c20958
1 parent 543ec1c commit 8a9cfcc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/aapt/StringPool.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <androidfw/ResourceTypes.h>
1414
#include <utils/String16.h>
1515
#include <utils/TextOutput.h>
16+
#include <utils/TypeHelpers.h>
1617

1718
#include <sys/types.h>
1819
#include <sys/stat.h>
@@ -193,5 +194,13 @@ class StringPool
193194
Vector<size_t> mOriginalPosToNewPos;
194195
};
195196

197+
// The entry types are trivially movable because all fields they contain, including
198+
// the vectors and strings, are trivially movable.
199+
namespace android {
200+
ANDROID_TRIVIAL_MOVE_TRAIT(StringPool::entry);
201+
ANDROID_TRIVIAL_MOVE_TRAIT(StringPool::entry_style_span);
202+
ANDROID_TRIVIAL_MOVE_TRAIT(StringPool::entry_style);
203+
};
204+
196205
#endif
197206

0 commit comments

Comments
 (0)