mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
LibWasm: Use String::join in Printer where apropriate
This commit is contained in:
parent
8a9d4246f1
commit
e0a6ed4bc0
1 changed files with 2 additions and 16 deletions
|
@ -131,27 +131,13 @@ void Printer::print(Wasm::DataSection::Data const& data)
|
|||
[this](DataSection::Data::Passive const& value) {
|
||||
print_indent();
|
||||
print("(passive init {}xu8 (", value.init.size());
|
||||
bool first = true;
|
||||
for (auto v : value.init) {
|
||||
if (first)
|
||||
print("{:x}", v);
|
||||
else
|
||||
print(" {:x}", v);
|
||||
first = false;
|
||||
}
|
||||
print(String::join(' ', value.init, "{:x}"sv));
|
||||
print(")\n");
|
||||
},
|
||||
[this](DataSection::Data::Active const& value) {
|
||||
print_indent();
|
||||
print("(active init {}xu8 (", value.init.size());
|
||||
bool first = true;
|
||||
for (auto v : value.init) {
|
||||
if (first)
|
||||
print("{:x}", v);
|
||||
else
|
||||
print(" {:x}", v);
|
||||
first = false;
|
||||
}
|
||||
print(String::join(' ', value.init, "{:x}"sv));
|
||||
print("\n");
|
||||
{
|
||||
TemporaryChange change { m_indent, m_indent + 1 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue