diff --git a/AK/Demangle.h b/AK/Demangle.h index dbba1b6c7edbab8c8bdd5d7e107c46b4af6acb41..42dc1cdae4a4c2237508edd3ec3a4c25a125f1b6 100644 --- a/AK/Demangle.h +++ b/AK/Demangle.h @@ -41,7 +41,7 @@ inline String demangle(const StringView& name) return name; #else int status = 0; - auto* demangled_name = abi::__cxa_demangle(String(name).characters(), nullptr, nullptr, &status); + auto* demangled_name = abi::__cxa_demangle(name.to_string().characters(), nullptr, nullptr, &status); auto string = String(status == 0 ? demangled_name : name); if (status == 0) kfree(demangled_name); diff --git a/Applications/IRCClient/IRCClient.cpp b/Applications/IRCClient/IRCClient.cpp index a052009e71d13db1d9e265401da1522716056065..f6f48371952438eba4b71e8ddf8a445de61ce5cc 100644 --- a/Applications/IRCClient/IRCClient.cpp +++ b/Applications/IRCClient/IRCClient.cpp @@ -870,7 +870,7 @@ void IRCClient::handle_user_command(const String& input) return; int command_length = command.length() + 1; StringView raw_message = input.view().substring_view(command_length, input.view().length() - command_length); - send(String::format("%s\r\n", String(raw_message).characters())); + send(String::format("%s\r\n", raw_message.to_string().characters())); return; } if (command == "/NICK") { diff --git a/Applications/PaintBrush/ToolboxWidget.cpp b/Applications/PaintBrush/ToolboxWidget.cpp index 5cf2705a6793b0622eae8e9627a555404994433f..4af60eac01c3318cb2c52e4403b2ebe64bb1ce97 100644 --- a/Applications/PaintBrush/ToolboxWidget.cpp +++ b/Applications/PaintBrush/ToolboxWidget.cpp @@ -80,7 +80,7 @@ ToolboxWidget::ToolboxWidget() button.set_checkable(true); button.set_exclusive(true); - button.set_icon(Gfx::Bitmap::load_from_file(String::format("/res/icons/paintbrush/%s.png", String(icon_name).characters()))); + button.set_icon(Gfx::Bitmap::load_from_file(String::format("/res/icons/paintbrush/%s.png", icon_name.to_string().characters()))); button.on_checked = [button = &button](auto checked) { if (checked) diff --git a/DevTools/ProfileViewer/Profile.cpp b/DevTools/ProfileViewer/Profile.cpp index b6653c876df2ffd32bf0674df4a3fe95dd174685..944869086e43a35f17a7527f0d9a50a26ff2db63 100644 --- a/DevTools/ProfileViewer/Profile.cpp +++ b/DevTools/ProfileViewer/Profile.cpp @@ -167,7 +167,7 @@ OwnPtr Profile::load_from_perfcore_file(const StringView& path) { auto file = Core::File::construct(path); if (!file->open(Core::IODevice::ReadOnly)) { - fprintf(stderr, "Unable to open %s, error: %s\n", String(path).characters(), file->error_string()); + fprintf(stderr, "Unable to open %s, error: %s\n", path.to_string().characters(), file->error_string()); return nullptr; } diff --git a/Libraries/LibCore/DirIterator.cpp b/Libraries/LibCore/DirIterator.cpp index de9707c0ff18fa67644c52985e44e523b6241cdf..537b29eb8517db683348927d23742b32e135543c 100644 --- a/Libraries/LibCore/DirIterator.cpp +++ b/Libraries/LibCore/DirIterator.cpp @@ -33,7 +33,7 @@ DirIterator::DirIterator(const StringView& path, Flags flags) : m_path(path) , m_flags(flags) { - m_dir = opendir(String(path).characters()); + m_dir = opendir(path.to_string().characters()); if (!m_dir) { m_error = errno; } diff --git a/Libraries/LibGUI/FilePicker.cpp b/Libraries/LibGUI/FilePicker.cpp index b4e7e4d6f8e4c7f409f5388783e40a4f229bd792..019a47d5906b4bb2d045e196ac5f6f468df02823 100644 --- a/Libraries/LibGUI/FilePicker.cpp +++ b/Libraries/LibGUI/FilePicker.cpp @@ -307,7 +307,7 @@ void FilePicker::on_file_return() bool FilePicker::file_exists(const StringView& path) { struct stat st; - int rc = stat(String(path).characters(), &st); + int rc = stat(path.to_string().characters(), &st); if (rc < 0) { if (errno == ENOENT) return false; diff --git a/Libraries/LibGUI/Icon.cpp b/Libraries/LibGUI/Icon.cpp index a6f1254a178779e01478be5c382ad3c24f9cd91a..01e13443ef32d5f765b3fae1d8b2f13a3f354c7c 100644 --- a/Libraries/LibGUI/Icon.cpp +++ b/Libraries/LibGUI/Icon.cpp @@ -94,8 +94,8 @@ void IconImpl::set_bitmap_for_size(int size, RefPtr&& bitmap) Icon Icon::default_icon(const StringView& name) { - auto bitmap16 = Gfx::Bitmap::load_from_file(String::format("/res/icons/16x16/%s.png", String(name).characters())); - auto bitmap32 = Gfx::Bitmap::load_from_file(String::format("/res/icons/32x32/%s.png", String(name).characters())); + auto bitmap16 = Gfx::Bitmap::load_from_file(String::format("/res/icons/16x16/%s.png", name.to_string().characters())); + auto bitmap32 = Gfx::Bitmap::load_from_file(String::format("/res/icons/32x32/%s.png", name.to_string().characters())); return Icon(move(bitmap16), move(bitmap32)); } diff --git a/Libraries/LibGfx/Bitmap.cpp b/Libraries/LibGfx/Bitmap.cpp index d254b60dae933aace826c25e0483aade256bd798..e885833110ada8eefcf01d4cc727bd91f9496ee3 100644 --- a/Libraries/LibGfx/Bitmap.cpp +++ b/Libraries/LibGfx/Bitmap.cpp @@ -194,7 +194,7 @@ Bitmap::~Bitmap() void Bitmap::set_mmap_name(const StringView& name) { ASSERT(m_needs_munmap); - ::set_mmap_name(m_data, size_in_bytes(), String(name).characters()); + ::set_mmap_name(m_data, size_in_bytes(), name.to_string().characters()); } void Bitmap::fill(Color color) diff --git a/Libraries/LibGfx/Color.cpp b/Libraries/LibGfx/Color.cpp index 80de68c49620008496270af455e2ee8121cc0c81..41e9a013ea6cf477471dd5b57ec6aa8097a34c58 100644 --- a/Libraries/LibGfx/Color.cpp +++ b/Libraries/LibGfx/Color.cpp @@ -182,7 +182,7 @@ static Optional parse_rgba_color(const StringView& string) if (!ok) return {}; - double alpha = strtod(String(parts[3]).characters(), nullptr); + double alpha = strtod(parts[3].to_string().characters(), nullptr); int a = alpha * 255; if (r < 0 || r > 255) diff --git a/Userland/mount.cpp b/Userland/mount.cpp index 195d74405615551e37dfd71e8a3e2ba5dd27ae46..c3b3e8c0f7c96bcf199fbc17b3995a11f22388d3 100644 --- a/Userland/mount.cpp +++ b/Userland/mount.cpp @@ -51,7 +51,7 @@ int parse_options(const StringView& options) else if (part == "bind") flags |= MS_BIND; else - fprintf(stderr, "Ignoring invalid option: %s\n", String(part).characters()); + fprintf(stderr, "Ignoring invalid option: %s\n", part.to_string().characters()); } return flags; }