diff options
author | 2018-04-16 18:21:14 +0000 | |
---|---|---|
committer | 2018-04-16 18:21:14 +0000 | |
commit | 61ffd4029032862c871c98ac04f12d4141d59383 (patch) | |
tree | b49449dd559ce7c717750d9da9684fdfce5ce481 /tools/aapt2/StringPool.cpp | |
parent | 35ecb89a8aa68f24d2e991df5bb9964ad15075dc (diff) |
Revert "AAPT: Modified StringPool uniqueness detection"
This reverts commit 35ecb89a8aa68f24d2e991df5bb9964ad15075dc.
Reason for revert: <Long make duration (infinite loop)>
Change-Id: I10d1cf53ca3054d40e23b06368ebaff6af69beab
Diffstat (limited to 'tools/aapt2/StringPool.cpp')
-rw-r--r-- | tools/aapt2/StringPool.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/aapt2/StringPool.cpp b/tools/aapt2/StringPool.cpp index 73a8259a3a87..b0ce9e1ec947 100644 --- a/tools/aapt2/StringPool.cpp +++ b/tools/aapt2/StringPool.cpp @@ -172,10 +172,9 @@ StringPool::Ref StringPool::MakeRef(const StringPiece& str, const Context& conte StringPool::Ref StringPool::MakeRefImpl(const StringPiece& str, const Context& context, bool unique) { if (unique) { - for (auto& indexed_str : indexed_strings_) { - if (str == indexed_str.first && context.priority == indexed_str.second->context.priority) { - return Ref(indexed_str.second); - } + auto iter = indexed_strings_.find(str); + if (iter != std::end(indexed_strings_)) { + return Ref(iter->second); } } |