lshal: --types works with --neat
Test: lshal_test
Change-Id: Ia2e6a2258b455605929a19da0c3213eae5f9d14f
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp
index c68d197..d497e5c 100644
--- a/cmds/lshal/ListCommand.cpp
+++ b/cmds/lshal/ListCommand.cpp
@@ -502,8 +502,11 @@
void ListCommand::dumpTable(const NullableOStream<std::ostream>& out) const {
if (mNeat) {
- MergedTable({&mServicesTable, &mPassthroughRefTable, &mImplementationsTable})
- .createTextTable().dump(out.buf());
+ std::vector<const Table*> tables;
+ forEachTable([&tables](const Table &table) {
+ tables.push_back(&table);
+ });
+ MergedTable(std::move(tables)).createTextTable().dump(out.buf());
return;
}