diff options
author | 2019-05-08 20:51:10 +0000 | |
---|---|---|
committer | 2019-05-08 20:51:10 +0000 | |
commit | e83c45106089b1adc5e9aad93029665fd02ab4d7 (patch) | |
tree | bf349f3f8bf1429ee737a59b955440c72420bbb7 /tools/aapt2/Debug.cpp | |
parent | cf6af044ce0f7759abef9f89fe13c688c038ed5b (diff) | |
parent | 42fe2b2ac7debe61bfa8b63ef3bb41b774f12cdf (diff) |
Merge "[aapt2] Close empty lists in "dump resources"."
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r-- | tools/aapt2/Debug.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 3da22b4fb9fa..7ffa5ffc09fe 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -178,19 +178,17 @@ class ValueBodyPrinter : public ConstValueVisitor { void Visit(const Array* array) override { const size_t count = array->elements.size(); printer_->Print("["); - if (count > 0) { - for (size_t i = 0u; i < count; i++) { - if (i != 0u && i % 4u == 0u) { - printer_->Println(); - printer_->Print(" "); - } - PrintItem(*array->elements[i]); - if (i != count - 1) { - printer_->Print(", "); - } + for (size_t i = 0u; i < count; i++) { + if (i != 0u && i % 4u == 0u) { + printer_->Println(); + printer_->Print(" "); + } + PrintItem(*array->elements[i]); + if (i != count - 1) { + printer_->Print(", "); } - printer_->Println("]"); } + printer_->Println("]"); } void Visit(const Plural* plural) override { |