diff options
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/LaunchServer/Launcher.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/LaunchServer/Launcher.h | 2 | ||||
-rw-r--r-- | Userland/Services/LoginServer/LoginWindow.h | 4 | ||||
-rw-r--r-- | Userland/Services/SystemServer/Service.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/SystemServer/Service.h | 2 | ||||
-rw-r--r-- | Userland/Services/Taskbar/TaskbarButton.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/TelnetServer/Client.cpp | 4 | ||||
-rw-r--r-- | Userland/Services/TelnetServer/Client.h | 2 | ||||
-rw-r--r-- | Userland/Services/TelnetServer/Parser.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/TelnetServer/Parser.h | 4 | ||||
-rw-r--r-- | Userland/Services/WindowServer/Cursor.cpp | 6 | ||||
-rw-r--r-- | Userland/Services/WindowServer/Cursor.h | 4 | ||||
-rw-r--r-- | Userland/Services/WindowServer/Menu.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/Menu.h | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/MultiScaleBitmaps.cpp | 6 | ||||
-rw-r--r-- | Userland/Services/WindowServer/MultiScaleBitmaps.h | 4 | ||||
-rw-r--r-- | Userland/Services/WindowServer/WindowFrame.cpp | 2 |
17 files changed, 26 insertions, 26 deletions
diff --git a/Userland/Services/LaunchServer/Launcher.cpp b/Userland/Services/LaunchServer/Launcher.cpp index 56e2433a64..b413561c2a 100644 --- a/Userland/Services/LaunchServer/Launcher.cpp +++ b/Userland/Services/LaunchServer/Launcher.cpp @@ -25,7 +25,7 @@ namespace LaunchServer { static Launcher* s_the; static bool spawn(String executable, const Vector<String>& arguments); -String Handler::name_from_executable(const StringView& executable) +String Handler::name_from_executable(StringView executable) { auto separator = executable.find_last('/'); if (separator.has_value()) { diff --git a/Userland/Services/LaunchServer/Launcher.h b/Userland/Services/LaunchServer/Launcher.h index fd8a4b64e9..bc1dacdb57 100644 --- a/Userland/Services/LaunchServer/Launcher.h +++ b/Userland/Services/LaunchServer/Launcher.h @@ -27,7 +27,7 @@ struct Handler { HashTable<String> file_types {}; HashTable<String> protocols {}; - static String name_from_executable(const StringView&); + static String name_from_executable(StringView); void from_executable(Type, const String&); String to_details_str() const; }; diff --git a/Userland/Services/LoginServer/LoginWindow.h b/Userland/Services/LoginServer/LoginWindow.h index d1ff8d64d1..823eae55bf 100644 --- a/Userland/Services/LoginServer/LoginWindow.h +++ b/Userland/Services/LoginServer/LoginWindow.h @@ -20,10 +20,10 @@ public: Function<void()> on_submit; String username() const { return m_username->text(); } - void set_username(StringView const& username) { m_username->set_text(username); } + void set_username(StringView username) { m_username->set_text(username); } String password() const { return m_password->text(); } - void set_password(StringView const& password) { m_password->set_text(password); } + void set_password(StringView password) { m_password->set_text(password); } private: LoginWindow(GUI::Window* parent = nullptr); diff --git a/Userland/Services/SystemServer/Service.cpp b/Userland/Services/SystemServer/Service.cpp index 3431f07606..877a2f8851 100644 --- a/Userland/Services/SystemServer/Service.cpp +++ b/Userland/Services/SystemServer/Service.cpp @@ -280,7 +280,7 @@ void Service::did_exit(int exit_code) activate(); } -Service::Service(const Core::ConfigFile& config, const StringView& name) +Service::Service(const Core::ConfigFile& config, StringView name) : Core::Object(nullptr) { VERIFY(config.has_group(name)); diff --git a/Userland/Services/SystemServer/Service.h b/Userland/Services/SystemServer/Service.h index 07a0c7adfa..dcc22a7244 100644 --- a/Userland/Services/SystemServer/Service.h +++ b/Userland/Services/SystemServer/Service.h @@ -27,7 +27,7 @@ public: void save_to(JsonObject&); private: - Service(const Core::ConfigFile&, const StringView& name); + Service(const Core::ConfigFile&, StringView name); void spawn(int socket_fd = -1); diff --git a/Userland/Services/Taskbar/TaskbarButton.cpp b/Userland/Services/Taskbar/TaskbarButton.cpp index 1ed0d239e7..d02cf99d68 100644 --- a/Userland/Services/Taskbar/TaskbarButton.cpp +++ b/Userland/Services/Taskbar/TaskbarButton.cpp @@ -53,7 +53,7 @@ void TaskbarButton::resize_event(GUI::ResizeEvent& event) return GUI::Button::resize_event(event); } -static void paint_custom_progressbar(GUI::Painter& painter, const Gfx::IntRect& rect, const Gfx::IntRect& text_rect, const Palette& palette, int min, int max, int value, const StringView& text, const Gfx::Font& font, Gfx::TextAlignment text_alignment) +static void paint_custom_progressbar(GUI::Painter& painter, const Gfx::IntRect& rect, const Gfx::IntRect& text_rect, const Palette& palette, int min, int max, int value, StringView text, const Gfx::Font& font, Gfx::TextAlignment text_alignment) { float range_size = max - min; float progress = (value - min) / range_size; diff --git a/Userland/Services/TelnetServer/Client.cpp b/Userland/Services/TelnetServer/Client.cpp index a1a23d3e4d..2839773bde 100644 --- a/Userland/Services/TelnetServer/Client.cpp +++ b/Userland/Services/TelnetServer/Client.cpp @@ -25,7 +25,7 @@ Client::Client(int id, RefPtr<Core::TCPSocket> socket, int ptm_fd) m_socket->on_ready_to_read = [this] { drain_socket(); }; m_ptm_notifier->on_ready_to_read = [this] { drain_pty(); }; m_parser.on_command = [this](const Command& command) { handle_command(command); }; - m_parser.on_data = [this](const StringView& data) { handle_data(data); }; + m_parser.on_data = [this](StringView data) { handle_data(data); }; m_parser.on_error = [this]() { handle_error(); }; send_commands({ { CMD_WILL, SUB_SUPPRESS_GO_AHEAD }, @@ -66,7 +66,7 @@ void Client::drain_pty() send_data(StringView(buffer, (size_t)nread)); } -void Client::handle_data(const StringView& data) +void Client::handle_data(StringView data) { write(m_ptm_fd, data.characters_without_null_termination(), data.length()); } diff --git a/Userland/Services/TelnetServer/Client.h b/Userland/Services/TelnetServer/Client.h index e717aee4b3..5ae9790f81 100644 --- a/Userland/Services/TelnetServer/Client.h +++ b/Userland/Services/TelnetServer/Client.h @@ -29,7 +29,7 @@ protected: void drain_socket(); void drain_pty(); - void handle_data(const StringView&); + void handle_data(StringView); void handle_command(const Command& command); void handle_error(); void send_data(StringView str); diff --git a/Userland/Services/TelnetServer/Parser.cpp b/Userland/Services/TelnetServer/Parser.cpp index a57b00a2a8..89aa2eeeac 100644 --- a/Userland/Services/TelnetServer/Parser.cpp +++ b/Userland/Services/TelnetServer/Parser.cpp @@ -9,7 +9,7 @@ #include "Parser.h" -void Parser::write(const StringView& data) +void Parser::write(StringView data) { for (size_t i = 0; i < data.length(); i++) { u8 ch = data[i]; diff --git a/Userland/Services/TelnetServer/Parser.h b/Userland/Services/TelnetServer/Parser.h index 57934518eb..fdc416b336 100644 --- a/Userland/Services/TelnetServer/Parser.h +++ b/Userland/Services/TelnetServer/Parser.h @@ -18,10 +18,10 @@ class Parser { public: Function<void(const Command&)> on_command; - Function<void(const StringView&)> on_data; + Function<void(StringView)> on_data; Function<void()> on_error; - void write(const StringView&); + void write(StringView); protected: enum State { diff --git a/Userland/Services/WindowServer/Cursor.cpp b/Userland/Services/WindowServer/Cursor.cpp index f0196d19bb..7f16bc36db 100644 --- a/Userland/Services/WindowServer/Cursor.cpp +++ b/Userland/Services/WindowServer/Cursor.cpp @@ -33,7 +33,7 @@ NonnullRefPtr<Cursor> Cursor::create(NonnullRefPtr<Gfx::Bitmap>&& bitmap, int sc return adopt_ref(*new Cursor(move(bitmap), scale_factor, Gfx::CursorParams(hotspot))); } -RefPtr<Cursor> Cursor::create(const StringView& filename, const StringView& default_filename) +RefPtr<Cursor> Cursor::create(StringView filename, StringView default_filename) { auto cursor = adopt_ref(*new Cursor()); if (cursor->load(filename, default_filename)) @@ -41,11 +41,11 @@ RefPtr<Cursor> Cursor::create(const StringView& filename, const StringView& defa return {}; } -bool Cursor::load(const StringView& filename, const StringView& default_filename) +bool Cursor::load(StringView filename, StringView default_filename) { bool did_load_any = false; - auto load_bitmap = [&](const StringView& path, int scale_factor) { + auto load_bitmap = [&](StringView path, int scale_factor) { auto bitmap_or_error = Gfx::Bitmap::try_load_from_file(path, scale_factor); if (bitmap_or_error.is_error()) return; diff --git a/Userland/Services/WindowServer/Cursor.h b/Userland/Services/WindowServer/Cursor.h index 0dd939ba02..5a414029d6 100644 --- a/Userland/Services/WindowServer/Cursor.h +++ b/Userland/Services/WindowServer/Cursor.h @@ -15,7 +15,7 @@ namespace WindowServer { class Cursor : public RefCounted<Cursor> { public: - static RefPtr<Cursor> create(const StringView&, const StringView&); + static RefPtr<Cursor> create(StringView, StringView); static NonnullRefPtr<Cursor> create(NonnullRefPtr<Gfx::Bitmap>&&, int); static RefPtr<Cursor> create(Gfx::StandardCursor); ~Cursor() = default; @@ -49,7 +49,7 @@ private: Cursor() { } Cursor(NonnullRefPtr<Gfx::Bitmap>&&, int, const Gfx::CursorParams&); - bool load(const StringView&, const StringView&); + bool load(StringView, StringView); void update_rect_if_animated(); HashMap<int, NonnullRefPtr<Gfx::Bitmap>> m_bitmaps; diff --git a/Userland/Services/WindowServer/Menu.cpp b/Userland/Services/WindowServer/Menu.cpp index e6c404d8ff..1346024b4f 100644 --- a/Userland/Services/WindowServer/Menu.cpp +++ b/Userland/Services/WindowServer/Menu.cpp @@ -24,7 +24,7 @@ namespace WindowServer { -u32 find_ampersand_shortcut_character(const StringView& string) +u32 find_ampersand_shortcut_character(StringView string) { Utf8View utf8_view { string }; for (auto it = utf8_view.begin(); it != utf8_view.end(); ++it) { diff --git a/Userland/Services/WindowServer/Menu.h b/Userland/Services/WindowServer/Menu.h index 384c54fe48..a2f72c7e12 100644 --- a/Userland/Services/WindowServer/Menu.h +++ b/Userland/Services/WindowServer/Menu.h @@ -164,6 +164,6 @@ private: HashMap<u32, Vector<size_t>> m_alt_shortcut_character_to_item_indices; }; -u32 find_ampersand_shortcut_character(const StringView&); +u32 find_ampersand_shortcut_character(StringView); } diff --git a/Userland/Services/WindowServer/MultiScaleBitmaps.cpp b/Userland/Services/WindowServer/MultiScaleBitmaps.cpp index e6434ee21e..937f1bf028 100644 --- a/Userland/Services/WindowServer/MultiScaleBitmaps.cpp +++ b/Userland/Services/WindowServer/MultiScaleBitmaps.cpp @@ -36,7 +36,7 @@ RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create_empty() return adopt_ref(*new MultiScaleBitmaps()); } -RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create(StringView const& filename, StringView const& default_filename) +RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create(StringView filename, StringView default_filename) { auto per_scale_bitmap = adopt_ref(*new MultiScaleBitmaps()); if (per_scale_bitmap->load(filename, default_filename)) @@ -44,14 +44,14 @@ RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create(StringView const& filename, return {}; } -bool MultiScaleBitmaps::load(StringView const& filename, StringView const& default_filename) +bool MultiScaleBitmaps::load(StringView filename, StringView default_filename) { Optional<Gfx::BitmapFormat> bitmap_format; bool did_load_any = false; m_bitmaps.clear(); // If we're reloading the bitmaps get rid of the old ones - auto add_bitmap = [&](StringView const& path, int scale_factor) { + auto add_bitmap = [&](StringView path, int scale_factor) { auto bitmap_or_error = Gfx::Bitmap::try_load_from_file(path, scale_factor); if (bitmap_or_error.is_error()) return; diff --git a/Userland/Services/WindowServer/MultiScaleBitmaps.h b/Userland/Services/WindowServer/MultiScaleBitmaps.h index ee0593c44d..765efc58cc 100644 --- a/Userland/Services/WindowServer/MultiScaleBitmaps.h +++ b/Userland/Services/WindowServer/MultiScaleBitmaps.h @@ -16,13 +16,13 @@ namespace WindowServer { class MultiScaleBitmaps : public RefCounted<MultiScaleBitmaps> { public: static RefPtr<MultiScaleBitmaps> create_empty(); - static RefPtr<MultiScaleBitmaps> create(StringView const& filename, StringView const& default_filename = {}); + static RefPtr<MultiScaleBitmaps> create(StringView filename, StringView default_filename = {}); Gfx::Bitmap const& default_bitmap() const { return bitmap(1); } Gfx::Bitmap const& bitmap(int scale_factor) const; Gfx::Bitmap const* find_bitmap(int scale_factor) const; Gfx::BitmapFormat format() const { return m_format; } - bool load(StringView const& filename, StringView const& default_filename = {}); + bool load(StringView filename, StringView default_filename = {}); void add_bitmap(int scale_factor, NonnullRefPtr<Gfx::Bitmap>&&); private: diff --git a/Userland/Services/WindowServer/WindowFrame.cpp b/Userland/Services/WindowServer/WindowFrame.cpp index 8c5e0ba9df..6bb3c35394 100644 --- a/Userland/Services/WindowServer/WindowFrame.cpp +++ b/Userland/Services/WindowServer/WindowFrame.cpp @@ -125,7 +125,7 @@ void WindowFrame::reload_config() { String icons_path = WindowManager::the().palette().title_button_icons_path(); - auto reload_icon = [&](RefPtr<MultiScaleBitmaps>& icon, StringView const& path, StringView const& default_path) { + auto reload_icon = [&](RefPtr<MultiScaleBitmaps>& icon, StringView path, StringView default_path) { StringBuilder full_path; full_path.append(icons_path); full_path.append(path); |