From 3f3f45580ab7266258e97cb3cecf1e24716d61c5 Mon Sep 17 00:00:00 2001 From: sin-ack Date: Mon, 11 Jul 2022 17:32:29 +0000 Subject: 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. --- Tests/AK/TestFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Tests/AK/TestFormat.cpp') diff --git a/Tests/AK/TestFormat.cpp b/Tests/AK/TestFormat.cpp index 29c922316d..6ba944312b 100644 --- a/Tests/AK/TestFormat.cpp +++ b/Tests/AK/TestFormat.cpp @@ -204,7 +204,7 @@ template<> struct AK::Formatter : Formatter { ErrorOr format(FormatBuilder& builder, B) { - return Formatter::format(builder, "B"); + return Formatter::format(builder, "B"sv); } }; @@ -288,7 +288,7 @@ template<> struct AK::Formatter : AK::Formatter { ErrorOr format(FormatBuilder& builder, C c) { - return AK::Formatter::format(builder, "C(i={})", c.i); + return AK::Formatter::format(builder, "C(i={})"sv, c.i); } }; -- cgit v1.2.3