mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWasm: Use String::join in Printer where apropriate
This commit is contained in:
parent
8a9d4246f1
commit
e0a6ed4bc0
Notes:
sideshowbarker
2024-07-17 06:23:58 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/e0a6ed4bc0 Pull-request: https://github.com/SerenityOS/serenity/pull/15455 Reviewed-by: https://github.com/linusg ✅
@ -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…
Reference in New Issue
Block a user