mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -54,7 +54,7 @@ ErrorOr<NonnullRefPtr<Gfx::Bitmap>> Image::decode_bitmap(ReadonlyBytes bitmap_da
|
|||
{
|
||||
// Spawn a new ImageDecoder service process and connect to it.
|
||||
auto client = TRY(ImageDecoderClient::Client::try_create());
|
||||
auto optional_mime_type = guessed_mime_type.map([](auto mime_type) { return mime_type.to_deprecated_string(); });
|
||||
auto optional_mime_type = guessed_mime_type.map([](auto mime_type) { return mime_type.to_byte_string(); });
|
||||
|
||||
// FIXME: Find a way to avoid the memory copying here.
|
||||
auto maybe_decoded_image = client->decode_image(bitmap_data, optional_mime_type);
|
||||
|
@ -85,14 +85,14 @@ ErrorOr<NonnullRefPtr<Image>> Image::create_from_pixel_paint_json(JsonObject con
|
|||
auto layers_value = json.get_array("layers"sv).value();
|
||||
for (auto& layer_value : layers_value.values()) {
|
||||
auto const& layer_object = layer_value.as_object();
|
||||
auto name = layer_object.get_deprecated_string("name"sv).value();
|
||||
auto name = layer_object.get_byte_string("name"sv).value();
|
||||
|
||||
auto bitmap_base64_encoded = layer_object.get_deprecated_string("bitmap"sv).value();
|
||||
auto bitmap_base64_encoded = layer_object.get_byte_string("bitmap"sv).value();
|
||||
auto bitmap_data = TRY(decode_base64(bitmap_base64_encoded));
|
||||
auto bitmap = TRY(decode_bitmap(bitmap_data, {}));
|
||||
auto layer = TRY(Layer::create_with_bitmap(*image, move(bitmap), name));
|
||||
|
||||
if (auto const& mask_object = layer_object.get_deprecated_string("mask"sv); mask_object.has_value()) {
|
||||
if (auto const& mask_object = layer_object.get_byte_string("mask"sv); mask_object.has_value()) {
|
||||
auto mask_base64_encoded = mask_object.value();
|
||||
auto mask_data = TRY(decode_base64(mask_base64_encoded));
|
||||
auto mask = TRY(decode_bitmap(mask_data, {}));
|
||||
|
@ -519,7 +519,7 @@ void Image::did_change_rect(Gfx::IntRect const& a_modified_rect)
|
|||
client->image_did_change_rect(modified_rect);
|
||||
}
|
||||
|
||||
ImageUndoCommand::ImageUndoCommand(Image& image, DeprecatedString action_text)
|
||||
ImageUndoCommand::ImageUndoCommand(Image& image, ByteString action_text)
|
||||
: m_snapshot(image.take_snapshot().release_value_but_fixme_should_propagate_errors())
|
||||
, m_image(image)
|
||||
, m_action_text(move(action_text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue