diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2022-07-11 17:57:32 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-12 23:11:35 +0200 |
commit | e5f09ea1703bacfbb79a4ad3c587a7d5d3d7bb13 (patch) | |
tree | 6d90ea8a795e90f19f907a225c1ea166de960930 /Userland/Services | |
parent | c70f45ff4498fcb7ce0671e9107ecff8009d7eb2 (diff) | |
download | serenity-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/Services')
-rw-r--r-- | Userland/Services/DHCPClient/DHCPv4Client.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/VirtualScreenBackend.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.cpp b/Userland/Services/DHCPClient/DHCPv4Client.cpp index ef980bfdb7..b49fcaf31f 100644 --- a/Userland/Services/DHCPClient/DHCPv4Client.cpp +++ b/Userland/Services/DHCPClient/DHCPv4Client.cpp @@ -184,7 +184,7 @@ ErrorOr<DHCPv4Client::Interfaces> DHCPv4Client::get_discoverable_interfaces() if (json.is_error() || !json.value().is_array()) { dbgln("Error: No network adapters available"); - return Error::from_string_literal("No network adapters available"sv); + return Error::from_string_literal("No network adapters available"); } Vector<InterfaceDescriptor> ifnames_to_immediately_discover, ifnames_to_attempt_later; diff --git a/Userland/Services/WindowServer/VirtualScreenBackend.cpp b/Userland/Services/WindowServer/VirtualScreenBackend.cpp index 11a7bc0f2e..30e644a46e 100644 --- a/Userland/Services/WindowServer/VirtualScreenBackend.cpp +++ b/Userland/Services/WindowServer/VirtualScreenBackend.cpp @@ -39,7 +39,7 @@ ErrorOr<void> VirtualScreenBackend::set_head_mode_setting(GraphicsHeadModeSettin mode_setting.horizontal_stride = static_cast<int>(mode_setting.horizontal_active * sizeof(Gfx::ARGB32)); m_pitch = mode_setting.horizontal_stride; if (static_cast<int>(mode_setting.horizontal_active * sizeof(Gfx::ARGB32)) != mode_setting.horizontal_stride) - return Error::from_string_literal("Unsupported pitch"sv); + return Error::from_string_literal("Unsupported pitch"); m_width = mode_setting.horizontal_active; return {}; |