diff options
author | Adam Lesinski <adamlesinski@google.com> | 2017-07-28 17:10:35 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2017-08-04 17:29:13 -0700 |
commit | 5b6ee115489ce93dafce57d7f5ac33564cd6ef52 (patch) | |
tree | c066ff004324618110f627942c635fab61789542 /tools/aapt2/ResourceValues.cpp | |
parent | 2b991665da34f34fb842ba77502989885e58f1b2 (diff) |
AAPT2: Ensure style strings are always first in StringPool
Move the styled strings to a separate section of the StringPool so
that sorting can never mess up the order of Styles.
Bug: 63570514
Test: make aapt2_tests
Change-Id: Id2ce1355b92be1bb31ce0daa7e54ae9b5b6c2ffe
Diffstat (limited to 'tools/aapt2/ResourceValues.cpp')
-rw-r--r-- | tools/aapt2/ResourceValues.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp index 947e091e2d48..eb59175edf3b 100644 --- a/tools/aapt2/ResourceValues.cpp +++ b/tools/aapt2/ResourceValues.cpp @@ -253,10 +253,9 @@ StyledString* StyledString::Clone(StringPool* new_pool) const { } void StyledString::Print(std::ostream* out) const { - *out << "(styled string) \"" << *value->str << "\""; + *out << "(styled string) \"" << value->value << "\""; for (const StringPool::Span& span : value->spans) { - *out << " " << *span.name << ":" << span.first_char << "," - << span.last_char; + *out << " " << *span.name << ":" << span.first_char << "," << span.last_char; } } |