mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 08:17:34 +00:00
Everywhere: Pass AK::ReadonlyBytes by value
This commit is contained in:
parent
8b1108e485
commit
80d4e830a0
42 changed files with 96 additions and 96 deletions
|
@ -182,14 +182,14 @@ public:
|
|||
return try_ensure_capacity_slowpath(new_capacity);
|
||||
}
|
||||
|
||||
void append(ReadonlyBytes const& bytes)
|
||||
void append(ReadonlyBytes bytes)
|
||||
{
|
||||
MUST(try_append(bytes));
|
||||
}
|
||||
|
||||
void append(void const* data, size_t data_size) { append({ data, data_size }); }
|
||||
|
||||
ErrorOr<void> try_append(ReadonlyBytes const& bytes)
|
||||
ErrorOr<void> try_append(ReadonlyBytes bytes)
|
||||
{
|
||||
return try_append(bytes.data(), bytes.size());
|
||||
}
|
||||
|
|
|
@ -351,7 +351,7 @@ requires(HasFormatter<T>) struct Formatter<Vector<T>> : StandardFormatter {
|
|||
|
||||
template<>
|
||||
struct Formatter<ReadonlyBytes> : Formatter<StringView> {
|
||||
void format(FormatBuilder& builder, ReadonlyBytes const& value)
|
||||
void format(FormatBuilder& builder, ReadonlyBytes value)
|
||||
{
|
||||
if (m_mode == Mode::Pointer) {
|
||||
Formatter<FlatPtr> formatter { *this };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue