mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:28:11 +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
|
@ -26,7 +26,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
// This is defined in ImportDialog.cpp, we can't include it twice, since the generated symbol is exported.
|
||||
extern char const select_format_page_gml[];
|
||||
extern StringView select_format_page_gml;
|
||||
|
||||
namespace Spreadsheet {
|
||||
|
||||
|
@ -245,7 +245,7 @@ Result<void, String> ExportDialog::make_and_run_for(StringView mime, Core::File&
|
|||
{
|
||||
auto wizard = GUI::WizardDialog::construct(GUI::Application::the()->active_window());
|
||||
wizard->set_title("File Export Wizard");
|
||||
wizard->set_icon(GUI::Icon::default_icon("app-spreadsheet").bitmap_for_size(16));
|
||||
wizard->set_icon(GUI::Icon::default_icon("app-spreadsheet"sv).bitmap_for_size(16));
|
||||
|
||||
auto export_xsv = [&]() -> Result<void, String> {
|
||||
// FIXME: Prompt for the user to select a specific sheet to export
|
||||
|
@ -283,7 +283,7 @@ Result<void, String> ExportDialog::make_and_run_for(StringView mime, Core::File&
|
|||
auto const* error = strerror(error_number);
|
||||
|
||||
StringBuilder sb;
|
||||
sb.append("Unable to save file. Error: ");
|
||||
sb.append("Unable to save file. Error: "sv);
|
||||
sb.append({ error, strlen(error) });
|
||||
|
||||
return sb.to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue