mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00: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) {
|
[this](DataSection::Data::Passive const& value) {
|
||||||
print_indent();
|
print_indent();
|
||||||
print("(passive init {}xu8 (", value.init.size());
|
print("(passive init {}xu8 (", value.init.size());
|
||||||
bool first = true;
|
print(String::join(' ', value.init, "{:x}"sv));
|
||||||
for (auto v : value.init) {
|
|
||||||
if (first)
|
|
||||||
print("{:x}", v);
|
|
||||||
else
|
|
||||||
print(" {:x}", v);
|
|
||||||
first = false;
|
|
||||||
}
|
|
||||||
print(")\n");
|
print(")\n");
|
||||||
},
|
},
|
||||||
[this](DataSection::Data::Active const& value) {
|
[this](DataSection::Data::Active const& value) {
|
||||||
print_indent();
|
print_indent();
|
||||||
print("(active init {}xu8 (", value.init.size());
|
print("(active init {}xu8 (", value.init.size());
|
||||||
bool first = true;
|
print(String::join(' ', value.init, "{:x}"sv));
|
||||||
for (auto v : value.init) {
|
|
||||||
if (first)
|
|
||||||
print("{:x}", v);
|
|
||||||
else
|
|
||||||
print(" {:x}", v);
|
|
||||||
first = false;
|
|
||||||
}
|
|
||||||
print("\n");
|
print("\n");
|
||||||
{
|
{
|
||||||
TemporaryChange change { m_indent, m_indent + 1 };
|
TemporaryChange change { m_indent, m_indent + 1 };
|
||||||
|
|
Loading…
Reference in a new issue