mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:07:46 +00:00
Snake: Replace DeprecatedString with String
This commit is contained in:
parent
d312fdc2d3
commit
ffc0046d74
5 changed files with 18 additions and 16 deletions
|
@ -61,10 +61,10 @@ ErrorOr<NonnullOwnPtr<ImageSkin>> ImageSkin::create(StringView skin_name)
|
|||
}
|
||||
|
||||
ImageSkin::ImageSkin(StringView skin_name, Vector<NonnullRefPtr<Gfx::Bitmap>> head_bitmaps, Vector<NonnullRefPtr<Gfx::Bitmap>> body_bitmaps)
|
||||
: m_skin_name(skin_name)
|
||||
, m_head_bitmaps(move(head_bitmaps))
|
||||
: m_head_bitmaps(move(head_bitmaps))
|
||||
, m_body_bitmaps(move(body_bitmaps))
|
||||
{
|
||||
m_skin_name = String::from_utf8(skin_name).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
static int image_index_from_directions(Direction from, Direction to)
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "SnakeSkin.h"
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Point.h>
|
||||
|
@ -29,7 +30,7 @@ public:
|
|||
private:
|
||||
ImageSkin(StringView skin_name, Vector<NonnullRefPtr<Gfx::Bitmap>> head_bitmaps, Vector<NonnullRefPtr<Gfx::Bitmap>> body_bitmaps);
|
||||
|
||||
DeprecatedString m_skin_name;
|
||||
String m_skin_name;
|
||||
|
||||
Vector<NonnullRefPtr<Gfx::Bitmap>> m_head_bitmaps;
|
||||
Vector<NonnullRefPtr<Gfx::Bitmap>> m_body_bitmaps;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue