summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/JPGLoader.cpp
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2022-07-11 17:57:32 +0000
committerAndreas Kling <kling@serenityos.org>2022-07-12 23:11:35 +0200
commite5f09ea1703bacfbb79a4ad3c587a7d5d3d7bb13 (patch)
tree6d90ea8a795e90f19f907a225c1ea166de960930 /Userland/Libraries/LibGfx/JPGLoader.cpp
parentc70f45ff4498fcb7ce0671e9107ecff8009d7eb2 (diff)
downloadserenity-e5f09ea1703bacfbb79a4ad3c587a7d5d3d7bb13.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGfx/JPGLoader.cpp')
-rw-r--r--Userland/Libraries/LibGfx/JPGLoader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGfx/JPGLoader.cpp b/Userland/Libraries/LibGfx/JPGLoader.cpp
index 08a2db96c4..48e6a8ceec 100644
--- a/Userland/Libraries/LibGfx/JPGLoader.cpp
+++ b/Userland/Libraries/LibGfx/JPGLoader.cpp
@@ -1285,15 +1285,15 @@ size_t JPGImageDecoderPlugin::frame_count()
ErrorOr<ImageFrameDescriptor> JPGImageDecoderPlugin::frame(size_t index)
{
if (index > 0)
- return Error::from_string_literal("JPGImageDecoderPlugin: Invalid frame index"sv);
+ return Error::from_string_literal("JPGImageDecoderPlugin: Invalid frame index");
if (m_context->state == JPGLoadingContext::State::Error)
- return Error::from_string_literal("JPGImageDecoderPlugin: Decoding failed"sv);
+ return Error::from_string_literal("JPGImageDecoderPlugin: Decoding failed");
if (m_context->state < JPGLoadingContext::State::BitmapDecoded) {
if (!decode_jpg(*m_context)) {
m_context->state = JPGLoadingContext::State::Error;
- return Error::from_string_literal("JPGImageDecoderPlugin: Decoding failed"sv);
+ return Error::from_string_literal("JPGImageDecoderPlugin: Decoding failed");
}
m_context->state = JPGLoadingContext::State::BitmapDecoded;
}