mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
Everywhere: Replace single-char StringView op. arguments with chars
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
This commit is contained in:
parent
3f3f45580a
commit
c8585b77d2
86 changed files with 283 additions and 283 deletions
|
@ -79,7 +79,7 @@ public:
|
|||
indent(builder, indentation);
|
||||
builder.append(m_text);
|
||||
}
|
||||
builder.append("\n");
|
||||
builder.append('\n');
|
||||
}
|
||||
virtual ~Comment() override = default;
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
builder.appendff("{}: ", m_key);
|
||||
m_value->format(builder, indentation, true);
|
||||
if (!is_inline)
|
||||
builder.append("\n");
|
||||
builder.append('\n');
|
||||
}
|
||||
|
||||
String key() const { return m_key; }
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
if (is_array()) {
|
||||
// custom array serialization as AK's doesn't pretty-print
|
||||
// objects and arrays (we only care about arrays (for now))
|
||||
builder.append("[");
|
||||
builder.append('[');
|
||||
auto first = true;
|
||||
as_array().for_each([&](auto& value) {
|
||||
if (!first)
|
||||
|
@ -140,12 +140,12 @@ public:
|
|||
first = false;
|
||||
value.serialize(builder);
|
||||
});
|
||||
builder.append("]");
|
||||
builder.append(']');
|
||||
} else {
|
||||
serialize(builder);
|
||||
}
|
||||
if (!is_inline)
|
||||
builder.append("\n");
|
||||
builder.append('\n');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue