mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +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
|
@ -148,6 +148,6 @@ template<>
|
|||
struct AK::Formatter<IOAddress> : AK::Formatter<FormatString> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, IOAddress value)
|
||||
{
|
||||
return Formatter<FormatString>::format(builder, "IO {:x}", value.get());
|
||||
return Formatter<FormatString>::format(builder, "IO {:x}"sv, value.get());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -42,8 +42,8 @@ public:
|
|||
|
||||
void set_apic_id(u32 apic_id) { m_apic_id = apic_id; }
|
||||
|
||||
static constexpr StringView s_amd_vendor_id = "AuthenticAMD";
|
||||
static constexpr StringView s_intel_vendor_id = "GenuineIntel";
|
||||
static constexpr StringView s_amd_vendor_id = "AuthenticAMD"sv;
|
||||
static constexpr StringView s_intel_vendor_id = "GenuineIntel"sv;
|
||||
|
||||
private:
|
||||
static NonnullOwnPtr<KString> build_vendor_id_string();
|
||||
|
|
|
@ -126,7 +126,7 @@ UNMAP_AFTER_INIT PhysicalAddress InterruptManagement::search_for_madt()
|
|||
auto rsdp = ACPI::StaticParsing::find_rsdp();
|
||||
if (!rsdp.has_value())
|
||||
return {};
|
||||
auto apic = ACPI::StaticParsing::find_table(rsdp.value(), "APIC");
|
||||
auto apic = ACPI::StaticParsing::find_table(rsdp.value(), "APIC"sv);
|
||||
if (!apic.has_value())
|
||||
return {};
|
||||
return apic.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue