1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

AK: Make "foo"_string infallible

Stop worrying about tiny OOMs.

Work towards #20405.
This commit is contained in:
Andreas Kling 2023-08-07 11:12:38 +02:00
parent db2a8725c6
commit 34344120f2
181 changed files with 626 additions and 630 deletions

View file

@ -116,14 +116,14 @@ ErrorOr<Vector<String>> StandardPaths::font_directories()
{
return Vector { {
#if defined(AK_OS_SERENITY)
TRY("/res/fonts"_string),
"/res/fonts"_string,
#elif defined(AK_OS_MACOS)
TRY("/System/Library/Fonts"_string),
TRY("/Library/Fonts"_string),
"/System/Library/Fonts"_string,
"/Library/Fonts"_string,
TRY(String::formatted("{}/Library/Fonts"sv, home_directory())),
#else
TRY("/usr/share/fonts"_string),
TRY("/usr/local/share/fonts"_string),
"/usr/share/fonts"_string,
"/usr/local/share/fonts"_string,
TRY(String::formatted("{}/.local/share/fonts"sv, home_directory())),
#endif
} };