From d5083f6f6b9bc76bbe64052bcec639eee752a321 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Mon, 16 Jan 2017 15:07:21 -0800 Subject: 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 --- tools/aapt2/io/FileSystem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/aapt2/io/FileSystem.cpp') diff --git a/tools/aapt2/io/FileSystem.cpp b/tools/aapt2/io/FileSystem.cpp index 828f34e9c883..027cbd041fa6 100644 --- a/tools/aapt2/io/FileSystem.cpp +++ b/tools/aapt2/io/FileSystem.cpp @@ -16,14 +16,16 @@ #include "io/FileSystem.h" +#include "androidfw/StringPiece.h" #include "utils/FileMap.h" #include "Source.h" #include "util/Files.h" #include "util/Maybe.h" -#include "util/StringPiece.h" #include "util/Util.h" +using android::StringPiece; + namespace aapt { namespace io { @@ -54,13 +56,11 @@ IFile* FileCollectionIterator::Next() { } IFile* FileCollection::InsertFile(const StringPiece& path) { - return (files_[path.ToString()] = - util::make_unique(Source(path))) - .get(); + return (files_[path.to_string()] = util::make_unique(Source(path))).get(); } IFile* FileCollection::FindFile(const StringPiece& path) { - auto iter = files_.find(path.ToString()); + auto iter = files_.find(path.to_string()); if (iter != files_.end()) { return iter->second.get(); } -- cgit v1.2.3