mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +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
|
@ -48,7 +48,7 @@ ShutdownDialog::ShutdownDialog()
|
|||
widget.layout()->set_spacing(0);
|
||||
|
||||
auto& banner_image = widget.add<GUI::ImageWidget>();
|
||||
banner_image.load_from_file("/res/graphics/brand-banner.png");
|
||||
banner_image.load_from_file("/res/graphics/brand-banner.png"sv);
|
||||
|
||||
auto& content_container = widget.add<GUI::Widget>();
|
||||
content_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
@ -63,7 +63,7 @@ ShutdownDialog::ShutdownDialog()
|
|||
icon_wrapper.set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
auto& icon_image = icon_wrapper.add<GUI::ImageWidget>();
|
||||
icon_image.set_bitmap(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/shutdown.png").release_value_but_fixme_should_propagate_errors());
|
||||
icon_image.set_bitmap(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/shutdown.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
auto& right_container = content_container.add<GUI::Widget>();
|
||||
right_container.set_layout<GUI::VerticalBoxLayout>();
|
||||
|
@ -113,7 +113,7 @@ ShutdownDialog::ShutdownDialog()
|
|||
center_on_screen();
|
||||
set_resizable(false);
|
||||
set_title("Exit SerenityOS");
|
||||
set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/power.png").release_value_but_fixme_should_propagate_errors());
|
||||
set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/power.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
// Request WindowServer to re-update us on the current theme as we might've not been alive for the last notification.
|
||||
refresh_system_theme();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue