1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:57:35 +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:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -9,7 +9,7 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/ByteString.h>
#include <AK/Noncopyable.h>
#include <AK/RefCounted.h>
#include <AK/Weakable.h>
@ -31,8 +31,8 @@ class Layer
AK_MAKE_NONMOVABLE(Layer);
public:
static ErrorOr<NonnullRefPtr<Layer>> create_with_size(Image&, Gfx::IntSize, DeprecatedString name);
static ErrorOr<NonnullRefPtr<Layer>> create_with_bitmap(Image&, NonnullRefPtr<Gfx::Bitmap>, DeprecatedString name);
static ErrorOr<NonnullRefPtr<Layer>> create_with_size(Image&, Gfx::IntSize, ByteString name);
static ErrorOr<NonnullRefPtr<Layer>> create_with_bitmap(Image&, NonnullRefPtr<Gfx::Bitmap>, ByteString name);
static ErrorOr<NonnullRefPtr<Layer>> create_snapshot(Image&, Layer const&);
~Layer() = default;
@ -68,8 +68,8 @@ public:
Gfx::IntRect relative_rect() const { return { location(), size() }; }
Gfx::IntRect rect() const { return { {}, size() }; }
DeprecatedString const& name() const { return m_name; }
void set_name(DeprecatedString);
ByteString const& name() const { return m_name; }
void set_name(ByteString);
enum class NotifyClients {
Yes,
@ -116,7 +116,7 @@ public:
Gfx::Bitmap& currently_edited_bitmap();
ErrorOr<NonnullRefPtr<Layer>> duplicate(DeprecatedString name);
ErrorOr<NonnullRefPtr<Layer>> duplicate(ByteString name);
ALWAYS_INLINE Color modify_pixel_with_editing_mask(int x, int y, Color const& target_color, Color const& current_color)
{
@ -134,11 +134,11 @@ public:
void on_second_paint(ImageEditor&);
private:
Layer(Image&, NonnullRefPtr<Gfx::Bitmap>, DeprecatedString name);
Layer(Image&, NonnullRefPtr<Gfx::Bitmap>, ByteString name);
Image& m_image;
DeprecatedString m_name;
ByteString m_name;
Gfx::IntPoint m_location;
NonnullRefPtr<Gfx::Bitmap> m_content_bitmap;
RefPtr<Gfx::Bitmap> m_scratch_edited_bitmap { nullptr };