mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:15:07 +00:00
Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
This commit is contained in:
parent
e5f09ea170
commit
3f3f45580a
762 changed files with 8315 additions and 8316 deletions
|
@ -43,7 +43,7 @@ static HashTable<RefPtr<TCPSocket>>* delayed_ack_sockets;
|
|||
void NetworkTask::spawn()
|
||||
{
|
||||
RefPtr<Thread> thread;
|
||||
auto name = KString::try_create("Network Task");
|
||||
auto name = KString::try_create("Network Task"sv);
|
||||
if (name.is_error())
|
||||
TODO();
|
||||
(void)Process::create_kernel_process(thread, name.release_value(), NetworkTask_main, nullptr);
|
||||
|
@ -90,7 +90,7 @@ void NetworkTask_main(void*)
|
|||
};
|
||||
|
||||
size_t buffer_size = 64 * KiB;
|
||||
auto region_or_error = MM.allocate_kernel_region(buffer_size, "Kernel Packet Buffer", Memory::Region::Access::ReadWrite);
|
||||
auto region_or_error = MM.allocate_kernel_region(buffer_size, "Kernel Packet Buffer"sv, Memory::Region::Access::ReadWrite);
|
||||
if (region_or_error.is_error())
|
||||
TODO();
|
||||
auto buffer_region = region_or_error.release_value();
|
||||
|
@ -104,7 +104,7 @@ void NetworkTask_main(void*)
|
|||
if (!packet_size) {
|
||||
auto timeout_time = Time::from_milliseconds(500);
|
||||
auto timeout = Thread::BlockTimeout { false, &timeout_time };
|
||||
[[maybe_unused]] auto result = packet_wait_queue.wait_on(timeout, "NetworkTask");
|
||||
[[maybe_unused]] auto result = packet_wait_queue.wait_on(timeout, "NetworkTask"sv);
|
||||
continue;
|
||||
}
|
||||
if (packet_size < sizeof(EthernetFrameHeader)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue