mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:57:34 +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:
parent
c70f45ff44
commit
e5f09ea170
51 changed files with 282 additions and 261 deletions
|
@ -58,7 +58,7 @@ public:
|
|||
u32 size;
|
||||
TRY(decode(size));
|
||||
if (size > NumericLimits<i32>::max())
|
||||
return Error::from_string_literal("IPC: Invalid HashMap size"sv);
|
||||
return Error::from_string_literal("IPC: Invalid HashMap size");
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
K key;
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
u32 size;
|
||||
TRY(decode(size));
|
||||
if (size > NumericLimits<i32>::max())
|
||||
return Error::from_string_literal("IPC: Invalid HashMap size"sv);
|
||||
return Error::from_string_literal("IPC: Invalid HashMap size");
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
K key;
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
u64 size;
|
||||
TRY(decode(size));
|
||||
if (size > NumericLimits<i32>::max())
|
||||
return Error::from_string_literal("IPC: Invalid Vector size"sv);
|
||||
return Error::from_string_literal("IPC: Invalid Vector size");
|
||||
VERIFY(vector.is_empty());
|
||||
TRY(vector.try_ensure_capacity(size));
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue