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-09-14 11:31:04 -0700
commitb791721cd1a6154e5582d824f5d20b2c8b8d5ac5 (patch)
tree363ba007cc0cd5d4ae55b7516696ac7064907feb /tools/aapt2/ResourceValues.cpp
parent44ec315e06560a5fc0e2cc462ef67c2a47e894b1 (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 Bug: 65645766 Change-Id: I13bc34a460671fc0a36246be0d287a3d37d244d6 Merged-In: 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 {