summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceValues.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-08-10 15:37:28 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-08-23 11:54:38 -0700
commit4ffea040641d3b74ab04b6d2d3e78280bc893d5f (patch)
tree778e5b278aa1bb79bb90785af279db7cd2a8a625 /tools/aapt2/ResourceValues.cpp
parent668feb252a226f39acbad801bf8e256a04cb3e1f (diff)
AAPT2: Define intermediate compiled XML proto
This proto format is meant to encapsulate more information that is specific to Android and allows for easier validation and manipulation across tools. Test: make aapt2_tests Change-Id: I13bc34a460671fc0a36246be0d287a3d37d244d6
Diffstat (limited to 'tools/aapt2/ResourceValues.cpp')
-rw-r--r--tools/aapt2/ResourceValues.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index eb59175edf3b..1cba19462839 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -805,13 +805,12 @@ bool Array::Equals(const Value* value) const {
return false;
}
- if (items.size() != other->items.size()) {
+ if (elements.size() != other->elements.size()) {
return false;
}
- return std::equal(items.begin(), items.end(), other->items.begin(),
- [](const std::unique_ptr<Item>& a,
- const std::unique_ptr<Item>& b) -> bool {
+ return std::equal(elements.begin(), elements.end(), other->elements.begin(),
+ [](const std::unique_ptr<Item>& a, const std::unique_ptr<Item>& b) -> bool {
return a->Equals(b.get());
});
}
@@ -820,14 +819,14 @@ Array* Array::Clone(StringPool* new_pool) const {
Array* array = new Array();
array->comment_ = comment_;
array->source_ = source_;
- for (auto& item : items) {
- array->items.emplace_back(std::unique_ptr<Item>(item->Clone(new_pool)));
+ for (auto& item : elements) {
+ array->elements.emplace_back(std::unique_ptr<Item>(item->Clone(new_pool)));
}
return array;
}
void Array::Print(std::ostream* out) const {
- *out << "(array) [" << util::Joiner(items, ", ") << "]";
+ *out << "(array) [" << util::Joiner(elements, ", ") << "]";
}
bool Plural::Equals(const Value* value) const {