From 8a0b238b1344dae0042bbb17b71c0c3b9b881f22 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Wed, 18 Oct 2017 15:07:33 -0700 Subject: AAPT2: Ensure strings are sorted by configuration Keep strings sorted by configuration so that strings likely to be selected (all match the same locale, for instance) are close together. Bug: 67958501 Test: make aapt2_tests Change-Id: Id17d93bf2e03ce408a6f619d3ea6dc313e393b76 --- tools/aapt2/ResourceValues.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/aapt2/ResourceValues.cpp') diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp index 1cba19462839..a5ddc524c3f5 100644 --- a/tools/aapt2/ResourceValues.cpp +++ b/tools/aapt2/ResourceValues.cpp @@ -55,7 +55,7 @@ bool RawString::Equals(const Value* value) const { } RawString* RawString::Clone(StringPool* new_pool) const { - RawString* rs = new RawString(new_pool->MakeRef(*value)); + RawString* rs = new RawString(new_pool->MakeRef(value)); rs->comment_ = comment_; rs->source_ = source_; return rs; @@ -197,7 +197,7 @@ bool String::Flatten(android::Res_value* out_value) const { } String* String::Clone(StringPool* new_pool) const { - String* str = new String(new_pool->MakeRef(*value)); + String* str = new String(new_pool->MakeRef(value)); str->comment_ = comment_; str->source_ = source_; str->untranslatable_sections = untranslatable_sections; @@ -280,7 +280,7 @@ bool FileReference::Flatten(android::Res_value* out_value) const { } FileReference* FileReference::Clone(StringPool* new_pool) const { - FileReference* fr = new FileReference(new_pool->MakeRef(*path)); + FileReference* fr = new FileReference(new_pool->MakeRef(path)); fr->file = file; fr->comment_ = comment_; fr->source_ = source_; -- cgit v1.2.3-59-g8ed1b