summaryrefslogtreecommitdiff
path: root/tools/aapt2/StringPool.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-01-16 15:07:21 -0800
committerAdam Lesinski <adamlesinski@google.com>2017-01-17 18:55:51 -0800
commitd5083f6f6b9bc76bbe64052bcec639eee752a321 (patch)
tree29b5dfb74c7e9b12164ced408315b0ad8d5cf527 /tools/aapt2/StringPool.h
parent04e7b6c6de620406348142ba9dd65bad094e264b (diff)
Move StringPiece to libandroidfw
libandroidfw needs to make use of StringPiece, so move it to libandroidfw and update all code referencing StringPiece in aapt2. Test: make libandroidfw_tests libaapt2_tests Change-Id: I68d7f0fc7c651b048d9d1f5e7971f10ef5349fa1
Diffstat (limited to 'tools/aapt2/StringPool.h')
-rw-r--r--tools/aapt2/StringPool.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/aapt2/StringPool.h b/tools/aapt2/StringPool.h
index a4f556ca52e4..d0ce489dae26 100644
--- a/tools/aapt2/StringPool.h
+++ b/tools/aapt2/StringPool.h
@@ -23,9 +23,10 @@
#include <unordered_map>
#include <vector>
+#include "androidfw/StringPiece.h"
+
#include "ConfigDescription.h"
#include "util/BigBuffer.h"
-#include "util/StringPiece.h"
namespace aapt {
@@ -149,14 +150,14 @@ class StringPool {
* Adds a string to the pool, unless it already exists. Returns
* a reference to the string in the pool.
*/
- Ref MakeRef(const StringPiece& str);
+ Ref MakeRef(const android::StringPiece& str);
/**
* Adds a string to the pool, unless it already exists, with a context
* object that can be used when sorting the string pool. Returns
* a reference to the string in the pool.
*/
- Ref MakeRef(const StringPiece& str, const Context& context);
+ Ref MakeRef(const android::StringPiece& str, const Context& context);
/**
* Adds a style to the string pool and returns a reference to it.
@@ -208,11 +209,11 @@ class StringPool {
static bool Flatten(BigBuffer* out, const StringPool& pool, bool utf8);
- Ref MakeRefImpl(const StringPiece& str, const Context& context, bool unique);
+ Ref MakeRefImpl(const android::StringPiece& str, const Context& context, bool unique);
std::vector<std::unique_ptr<Entry>> strings_;
std::vector<std::unique_ptr<StyleEntry>> styles_;
- std::unordered_multimap<StringPiece, Entry*> indexed_strings_;
+ std::unordered_multimap<android::StringPiece, Entry*> indexed_strings_;
};
//