mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17: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
|
@ -177,20 +177,20 @@ void NewProjectDialog::do_create_project()
|
|||
{
|
||||
auto project_template = selected_template();
|
||||
if (!project_template) {
|
||||
GUI::MessageBox::show_error(this, "Could not create project: no template selected.");
|
||||
GUI::MessageBox::show_error(this, "Could not create project: no template selected."sv);
|
||||
return;
|
||||
}
|
||||
|
||||
auto maybe_project_name = get_available_project_name();
|
||||
auto maybe_project_full_path = get_project_full_path();
|
||||
if (!maybe_project_name.has_value() || !maybe_project_full_path.has_value()) {
|
||||
GUI::MessageBox::show_error(this, "Could not create project: invalid project name or path.");
|
||||
GUI::MessageBox::show_error(this, "Could not create project: invalid project name or path."sv);
|
||||
return;
|
||||
}
|
||||
|
||||
auto create_in = m_create_in_input->text();
|
||||
if (!Core::File::exists(create_in) || !Core::File::is_directory(create_in)) {
|
||||
auto result = GUI::MessageBox::show(this, String::formatted("The directory {} does not exist yet, would you like to create it?", create_in), "New project", GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
||||
auto result = GUI::MessageBox::show(this, String::formatted("The directory {} does not exist yet, would you like to create it?", create_in), "New project"sv, GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
|
||||
if (result != GUI::MessageBox::ExecResult::Yes)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue