summaryrefslogtreecommitdiff
path: root/tools/aapt2/StringPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/StringPool.cpp')
-rw-r--r--tools/aapt2/StringPool.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/aapt2/StringPool.cpp b/tools/aapt2/StringPool.cpp
index 705b1ab052af..3a1a18c01e1c 100644
--- a/tools/aapt2/StringPool.cpp
+++ b/tools/aapt2/StringPool.cpp
@@ -191,6 +191,13 @@ StringPool::Ref StringPool::MakeRefImpl(const StringPiece& str, const Context& c
return Ref(borrow);
}
+StringPool::Ref StringPool::MakeRef(const Ref& ref) {
+ if (ref.entry_->pool_ == this) {
+ return ref;
+ }
+ return MakeRef(ref.entry_->value, ref.entry_->context);
+}
+
StringPool::StyleRef StringPool::MakeRef(const StyleString& str) {
return MakeRef(str, Context{});
}