mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Everywhere: Split Error::from_string_literal and Error::from_string_view
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
This commit is contained in:
@@ -56,7 +56,7 @@ ErrorOr<void> decode(Decoder& decoder, Gfx::ShareableBitmap& shareable_bitmap)
|
||||
u32 raw_bitmap_format;
|
||||
TRY(decoder.decode(raw_bitmap_format));
|
||||
if (!Gfx::is_valid_bitmap_format(raw_bitmap_format))
|
||||
return Error::from_string_literal("IPC: Invalid Gfx::ShareableBitmap format"sv);
|
||||
return Error::from_string_literal("IPC: Invalid Gfx::ShareableBitmap format");
|
||||
auto bitmap_format = (Gfx::BitmapFormat)raw_bitmap_format;
|
||||
Vector<Gfx::ARGB32> palette;
|
||||
if (Gfx::Bitmap::is_indexed(bitmap_format)) {
|
||||
|
||||
Reference in New Issue
Block a user