mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +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
|
@ -118,7 +118,7 @@ public:
|
|||
if (!result.is_error())
|
||||
break;
|
||||
if (result.error() != QueueStatus::Full)
|
||||
return Error::from_string_literal("Unexpected error while enqueuing"sv);
|
||||
return Error::from_string_literal("Unexpected error while enqueuing");
|
||||
|
||||
wait_function();
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ private:
|
|||
SharedMemorySPCQ* shared_queue = is_new ? new (raw_mapping) SharedMemorySPCQ() : reinterpret_cast<SharedMemorySPCQ*>(raw_mapping);
|
||||
|
||||
if (!shared_queue)
|
||||
return Error::from_string_literal("Unexpected error when creating shared queue from raw memory"sv);
|
||||
return Error::from_string_literal("Unexpected error when creating shared queue from raw memory");
|
||||
|
||||
return SharedSingleProducerCircularQueue<T, Size> { move(name), adopt_ref(*new (nothrow) RefCountedSharedMemorySPCQ(shared_queue, fd)) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue