Everywhere: Remove sv suffix from format string literals

This prevents the compile-time checks that would catch errors in the
format invocation (which would usually lead to a runtime crash).
This commit is contained in:
Timothy Flynn 2025-04-08 13:50:50 -04:00 committed by Tim Flynn
commit f070264800
Notes: github-actions[bot] 2025-04-09 00:01:12 +00:00
28 changed files with 51 additions and 51 deletions

View file

@ -99,7 +99,7 @@ struct Formatter<Core::DateTime> : StandardFormatter {
ErrorOr<void> format(FormatBuilder& builder, Core::DateTime const& value)
{
// Can't use DateTime::to_string() here: It doesn't propagate allocation failure.
return builder.builder().try_appendff("{:04d}-{:02d}-{:02d} {:02d}:{:02d}:{:02d}"sv,
return builder.builder().try_appendff("{:04d}-{:02d}-{:02d} {:02d}:{:02d}:{:02d}",
value.year(), value.month(), value.day(),
value.hour(), value.minute(), value.second());
}

View file

@ -267,15 +267,15 @@ ErrorOr<Vector<String>> StandardPaths::font_directories()
TRY(String::formatted(R"({}\Fonts)"sv, getenv("WINDIR"))),
TRY(String::formatted(R"({}\Microsoft\Windows\Fonts)"sv, getenv("LOCALAPPDATA"))),
# else
TRY(String::formatted("{}/fonts"sv, user_data_directory())),
TRY(String::formatted("{}/X11/fonts"sv, user_data_directory())),
TRY(String::formatted("{}/fonts", user_data_directory())),
TRY(String::formatted("{}/X11/fonts", user_data_directory())),
# endif
} };
# if !(defined(AK_OS_SERENITY) || defined(AK_OS_MACOS) || defined(AK_OS_WINDOWS))
auto data_directories = system_data_directories();
for (auto& data_directory : data_directories) {
paths.append(TRY(String::formatted("{}/fonts"sv, data_directory)));
paths.append(TRY(String::formatted("{}/X11/fonts"sv, data_directory)));
paths.append(TRY(String::formatted("{}/fonts", data_directory)));
paths.append(TRY(String::formatted("{}/X11/fonts", data_directory)));
}
# endif
return paths;