summaryrefslogtreecommitdiff
path: root/tools/aapt2/compile/Compile.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-01-19 23:40:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-01-19 23:40:06 +0000
commit1f9f11007db09bbbc156965e77b10de82a32a544 (patch)
treee715a9edb691da38726c2c5487625bd35b05ec94 /tools/aapt2/compile/Compile.cpp
parent12375e9e0d14868cf63c0d6584c7a7d9440c30c4 (diff)
parentd5083f6f6b9bc76bbe64052bcec639eee752a321 (diff)
Merge "Move StringPiece to libandroidfw"
Diffstat (limited to 'tools/aapt2/compile/Compile.cpp')
-rw-r--r--tools/aapt2/compile/Compile.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/aapt2/compile/Compile.cpp b/tools/aapt2/compile/Compile.cpp
index f0b18e65cc1a..8027f4289169 100644
--- a/tools/aapt2/compile/Compile.cpp
+++ b/tools/aapt2/compile/Compile.cpp
@@ -19,6 +19,12 @@
#include <fstream>
#include <string>
+#include "android-base/errors.h"
+#include "android-base/file.h"
+#include "androidfw/StringPiece.h"
+#include "google/protobuf/io/coded_stream.h"
+#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
+
#include "ConfigDescription.h"
#include "Diagnostics.h"
#include "Flags.h"
@@ -38,11 +44,7 @@
#include "xml/XmlDom.h"
#include "xml/XmlPullParser.h"
-#include "android-base/errors.h"
-#include "android-base/file.h"
-#include "google/protobuf/io/coded_stream.h"
-#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
-
+using android::StringPiece;
using google::protobuf::io::CopyingOutputStreamAdaptor;
using google::protobuf::io::ZeroCopyOutputStream;
@@ -103,9 +105,8 @@ static Maybe<ResourcePathData> ExtractResourcePathData(const std::string& path,
name = name.substr(0, dot_pos);
}
- return ResourcePathData{Source(path), dir_str.ToString(),
- name.ToString(), extension.ToString(),
- config_str.ToString(), config};
+ return ResourcePathData{Source(path), dir_str.to_string(), name.to_string(),
+ extension.to_string(), config_str.to_string(), config};
}
struct CompileOptions {