diff options
author | asynts <asynts@gmail.com> | 2020-08-15 18:38:24 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-15 21:21:18 +0200 |
commit | fff581cd725db6b9cc1e1fd25503c68ec2d044d3 (patch) | |
tree | 0c0a510f5cbd1c2c6c1613b11209655624eda893 /Userland/base64.cpp | |
parent | 525d51bbb526912946c491e502b57cf439ab3906 (diff) | |
download | serenity-fff581cd725db6b9cc1e1fd25503c68ec2d044d3.zip |
AK: Rename span() to bytes() when appropriate.
I originally defined the bytes() method for the String class, because it
made it obvious that it's a span of bytes instead of span of characters.
This commit makes this more consistent by defining a bytes() method when
the type of the span is known to be u8.
Additionaly, the cast operator to Bytes is overloaded for ByteBuffer and
such.
Diffstat (limited to 'Userland/base64.cpp')
-rw-r--r-- | Userland/base64.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/base64.cpp b/Userland/base64.cpp index a91275a0c8..0af7a684a4 100644 --- a/Userland/base64.cpp +++ b/Userland/base64.cpp @@ -75,6 +75,6 @@ int main(int argc, char** argv) return 0; } - auto encoded = encode_base64(buffer.span()); + auto encoded = encode_base64(buffer); printf("%s\n", encoded.characters()); } |