1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:07:36 +00:00

Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
parent ad5d217e76
commit 8b1108e485
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();