mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:07:45 +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
|
@ -24,7 +24,7 @@ static void search_and_print_results(String const& query)
|
|||
for_each_character_containing(query, [&](auto code_point, auto display_name) {
|
||||
StringBuilder builder;
|
||||
builder.append_code_point(code_point);
|
||||
builder.append(" - ");
|
||||
builder.append(" - "sv);
|
||||
builder.append(display_name);
|
||||
outln(builder.string_view());
|
||||
result_count++;
|
||||
|
@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 0;
|
||||
}
|
||||
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-character-map"));
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-character-map"sv));
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
window->set_title("Character Map");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
@ -71,7 +71,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto character_map_widget = TRY(window->try_set_main_widget<CharacterMapWidget>());
|
||||
character_map_widget->initialize_menubar(*window);
|
||||
|
||||
auto font_query = Config::read_string("CharacterMap", "History", "Font", Gfx::FontDatabase::the().default_font_query());
|
||||
auto font_query = Config::read_string("CharacterMap"sv, "History"sv, "Font"sv, Gfx::FontDatabase::the().default_font_query());
|
||||
character_map_widget->set_font(Gfx::FontDatabase::the().get_by_name(font_query));
|
||||
|
||||
window->show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue