mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +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
|
@ -47,8 +47,8 @@ ErrorOr<void> GalleryWidget::load_basic_model_tab()
|
|||
m_add_new_item = *tab->find_descendant_of_type_named<GUI::Button>("add_new_item");
|
||||
m_remove_selected_item = *tab->find_descendant_of_type_named<GUI::Button>("remove_selected_item");
|
||||
|
||||
m_add_new_item->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/plus.png").release_value_but_fixme_should_propagate_errors());
|
||||
m_remove_selected_item->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/minus.png").release_value_but_fixme_should_propagate_errors());
|
||||
m_add_new_item->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/plus.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
m_remove_selected_item->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/minus.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
m_new_item_name->on_return_pressed = [&] { add_textbox_contents_to_basic_model(); };
|
||||
m_add_new_item->on_click = [&](auto) { add_textbox_contents_to_basic_model(); };
|
||||
|
@ -72,6 +72,6 @@ void GalleryWidget::add_textbox_contents_to_basic_model()
|
|||
{
|
||||
if (!m_new_item_name->current_line().is_empty()) {
|
||||
m_basic_model->add_item(m_new_item_name->current_line().to_utf8());
|
||||
m_new_item_name->set_text("");
|
||||
m_new_item_name->set_text(""sv);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue