diff options
author | 2025-02-13 13:01:32 -0800 | |
---|---|---|
committer | 2025-02-13 13:01:32 -0800 | |
commit | 131c2c8f7da06f4485b3103e424e87cf450beea7 (patch) | |
tree | 3631a29ac976c86febd5474d39f34a72bf85344c /tools/aapt2/Debug.cpp | |
parent | f7f6931f1d7ea585f7cb70ac6e34abc2cfad45e7 (diff) | |
parent | e5c50e78975e777f37aab6e6279d337a0fd111ee (diff) |
Merge "[res] Small cleanup in aapt2 output + optimization" into main
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r-- | tools/aapt2/Debug.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index e24fe07f959b..9ef8b7dc9947 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -349,20 +349,22 @@ void Debug::PrintTable(const ResourceTable& table, const DebugPrintTableOptions& value->value->Accept(&body_printer); printer->Undent(); } - printer->Println("Flag disabled values:"); - for (const auto& value : entry.flag_disabled_values) { - printer->Print("("); - printer->Print(value->config.to_string()); - printer->Print(") "); - value->value->Accept(&headline_printer); - if (options.show_sources && !value->value->GetSource().path.empty()) { - printer->Print(" src="); - printer->Print(value->value->GetSource().to_string()); + if (!entry.flag_disabled_values.empty()) { + printer->Println("Flag disabled values:"); + for (const auto& value : entry.flag_disabled_values) { + printer->Print("("); + printer->Print(value->config.to_string()); + printer->Print(") "); + value->value->Accept(&headline_printer); + if (options.show_sources && !value->value->GetSource().path.empty()) { + printer->Print(" src="); + printer->Print(value->value->GetSource().to_string()); + } + printer->Println(); + printer->Indent(); + value->value->Accept(&body_printer); + printer->Undent(); } - printer->Println(); - printer->Indent(); - value->value->Accept(&body_printer); - printer->Undent(); } printer->Undent(); } |