1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

Kernel: Use operator ""sv in all class_name() implementations

Previously there was a mix of returning plain strings and returning
explicit string views using `operator ""sv`. This change switches them
all to standardized on `operator ""sv` as it avoids a call to strlen.
This commit is contained in:
Brian Gianforcaro 2021-10-02 15:24:00 -07:00 committed by Andreas Kling
parent 836c22ea13
commit 5f1c98e576
39 changed files with 39 additions and 39 deletions

View file

@ -37,7 +37,7 @@ UNMAP_AFTER_INIT PATADiskDevice::~PATADiskDevice()
StringView PATADiskDevice::class_name() const
{
return "PATADiskDevice";
return "PATADiskDevice"sv;
}
void PATADiskDevice::start_request(AsyncBlockDeviceRequest& request)

View file

@ -77,7 +77,7 @@ bool DiskPartition::can_write(const OpenFileDescription& fd, size_t offset) cons
StringView DiskPartition::class_name() const
{
return "DiskPartition";
return "DiskPartition"sv;
}
}

View file

@ -34,7 +34,7 @@ RamdiskDevice::~RamdiskDevice()
StringView RamdiskDevice::class_name() const
{
return "RamdiskDevice";
return "RamdiskDevice"sv;
}
void RamdiskDevice::start_request(AsyncBlockDeviceRequest& request)

View file

@ -33,7 +33,7 @@ SATADiskDevice::~SATADiskDevice()
StringView SATADiskDevice::class_name() const
{
return "SATADiskDevice";
return "SATADiskDevice"sv;
}
void SATADiskDevice::start_request(AsyncBlockDeviceRequest& request)

View file

@ -29,7 +29,7 @@ StorageDevice::StorageDevice(const StorageController& controller, int major, int
StringView StorageDevice::class_name() const
{
return "StorageDevice";
return "StorageDevice"sv;
}
NonnullRefPtr<StorageController> StorageDevice::controller() const