summaryrefslogtreecommitdiff
path: root/tools/aapt2/configuration/ConfigurationParser.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-08-17 17:43:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-08-17 17:43:53 +0000
commit2def7dcf22abbe4a2f419a82b080a7bcf2c8684d (patch)
treed16be10f419bbd9ba839ea2f24b02395320d1fcc /tools/aapt2/configuration/ConfigurationParser.cpp
parent88bf767525b7dd8e7959d8aab18136754ccc2745 (diff)
parent6b372991296c9f2bd6f8f8847dcd23d50970d06d (diff)
Merge "AAPT2: Change XmlDom to exclude Namespace as a node"
Diffstat (limited to 'tools/aapt2/configuration/ConfigurationParser.cpp')
-rw-r--r--tools/aapt2/configuration/ConfigurationParser.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/aapt2/configuration/ConfigurationParser.cpp b/tools/aapt2/configuration/ConfigurationParser.cpp
index a9d6da0258cb..424e9be3ef09 100644
--- a/tools/aapt2/configuration/ConfigurationParser.cpp
+++ b/tools/aapt2/configuration/ConfigurationParser.cpp
@@ -53,7 +53,6 @@ using ::aapt::io::RegularFile;
using ::aapt::io::StringInputStream;
using ::aapt::util::TrimWhitespace;
using ::aapt::xml::Element;
-using ::aapt::xml::FindRootElement;
using ::aapt::xml::NodeCast;
using ::aapt::xml::XmlActionExecutor;
using ::aapt::xml::XmlActionExecutorPolicy;
@@ -238,13 +237,13 @@ ConfigurationParser::ConfigurationParser(std::string contents)
Maybe<PostProcessingConfiguration> ConfigurationParser::Parse() {
StringInputStream in(contents_);
- auto doc = xml::Inflate(&in, diag_, Source("config.xml"));
+ std::unique_ptr<xml::XmlResource> doc = xml::Inflate(&in, diag_, Source("config.xml"));
if (!doc) {
return {};
}
// Strip any namespaces from the XML as the XmlActionExecutor ignores anything with a namespace.
- auto* root = FindRootElement(doc.get());
+ Element* root = doc->root.get();
if (root == nullptr) {
diag_->Error(DiagMessage() << "Could not find the root element in the XML document");
return {};