Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
commit 8b1108e485
Notes: sideshowbarker 2024-07-18 01:17:49 +09:00
392 changed files with 978 additions and 978 deletions

View file

@ -38,7 +38,7 @@ static constexpr auto make_lookup_table()
return table;
}
size_t calculate_base64_decoded_length(const StringView& input)
size_t calculate_base64_decoded_length(StringView input)
{
return input.length() * 3 / 4;
}
@ -48,7 +48,7 @@ size_t calculate_base64_encoded_length(ReadonlyBytes input)
return ((4 * input.size() / 3) + 3) & ~3;
}
Optional<ByteBuffer> decode_base64(const StringView& input)
Optional<ByteBuffer> decode_base64(StringView input)
{
auto get = [&](const size_t offset, bool* is_padding) -> Optional<u8> {
constexpr auto table = make_lookup_table();