1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 00:27:35 +00:00

AK: Change the signature of AK::encode_base64() to use Span.

This commit is contained in:
asynts 2020-07-27 14:16:33 +02:00 committed by Andreas Kling
parent 5fa0fdb219
commit abe925e4b0
5 changed files with 7 additions and 6 deletions

View file

@ -28,8 +28,8 @@
#include <AK/ByteBuffer.h>
#include <AK/FlyString.h>
#include <AK/Function.h>
#include <AK/Utf8View.h>
#include <AK/String.h>
#include <AK/Utf8View.h>
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/Function.h>
@ -278,7 +278,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa)
byte_string.append(codepoint);
}
auto encoded = encode_base64(ByteBuffer::wrap(byte_string.data(), byte_string.size()));
auto encoded = encode_base64(byte_string.span());
return JS::js_string(interpreter, move(encoded));
}