diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-12 14:57:15 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-12 14:57:15 +0200 |
commit | dddf45f56367b6e9e3a6740fe9bf70d81b4d6b1a (patch) | |
tree | d9f6b21aa34686f78056f419473e8e5ba22745b1 /Servers | |
parent | 23e6c45e877dd24637bba9407666d30a9e62f368 (diff) | |
download | serenity-dddf45f56367b6e9e3a6740fe9bf70d81b4d6b1a.zip |
Change String&& arguments to const String& in a couple of places.
String&& is more nuisance than anything, and the codegen improvement is
basically negligible since the underlying type is already retainable.
Diffstat (limited to 'Servers')
-rw-r--r-- | Servers/WindowServer/WSEvent.h | 8 | ||||
-rw-r--r-- | Servers/WindowServer/WSMenu.cpp | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSMenu.h | 2 | ||||
-rw-r--r-- | Servers/WindowServer/WSWindow.cpp | 4 | ||||
-rw-r--r-- | Servers/WindowServer/WSWindow.h | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/Servers/WindowServer/WSEvent.h b/Servers/WindowServer/WSEvent.h index a7d5b21df5..d0033ae48e 100644 --- a/Servers/WindowServer/WSEvent.h +++ b/Servers/WindowServer/WSEvent.h @@ -407,9 +407,9 @@ private: class WSAPISetWallpaperRequest final : public WSAPIClientRequest { public: - explicit WSAPISetWallpaperRequest(int client_id, String&& wallpaper) + explicit WSAPISetWallpaperRequest(int client_id, const String& wallpaper) : WSAPIClientRequest(WSEvent::APISetWallpaperRequest, client_id) - , m_wallpaper(move(wallpaper)) + , m_wallpaper(wallpaper) { } @@ -429,10 +429,10 @@ public: class WSAPISetWindowTitleRequest final : public WSAPIClientRequest { public: - explicit WSAPISetWindowTitleRequest(int client_id, int window_id, String&& title) + explicit WSAPISetWindowTitleRequest(int client_id, int window_id, const String& title) : WSAPIClientRequest(WSEvent::APISetWindowTitleRequest, client_id) , m_window_id(window_id) - , m_title(move(title)) + , m_title(title) { } diff --git a/Servers/WindowServer/WSMenu.cpp b/Servers/WindowServer/WSMenu.cpp index e505ccf62a..d900a49b6b 100644 --- a/Servers/WindowServer/WSMenu.cpp +++ b/Servers/WindowServer/WSMenu.cpp @@ -11,7 +11,7 @@ #include <SharedGraphics/StylePainter.h> #include <SharedGraphics/Font.h> -WSMenu::WSMenu(WSClientConnection* client, int menu_id, String&& name) +WSMenu::WSMenu(WSClientConnection* client, int menu_id, const String& name) : m_client(client) , m_menu_id(menu_id) , m_name(move(name)) diff --git a/Servers/WindowServer/WSMenu.h b/Servers/WindowServer/WSMenu.h index 0366bfb56e..43f66f838d 100644 --- a/Servers/WindowServer/WSMenu.h +++ b/Servers/WindowServer/WSMenu.h @@ -15,7 +15,7 @@ class Font; class WSMenu final : public CObject { public: - WSMenu(WSClientConnection*, int menu_id, String&& name); + WSMenu(WSClientConnection*, int menu_id, const String& name); virtual ~WSMenu() override; WSClientConnection* client() { return m_client; } diff --git a/Servers/WindowServer/WSWindow.cpp b/Servers/WindowServer/WSWindow.cpp index 8e653f682b..20e50ac467 100644 --- a/Servers/WindowServer/WSWindow.cpp +++ b/Servers/WindowServer/WSWindow.cpp @@ -50,11 +50,11 @@ WSWindow::~WSWindow() WSWindowManager::the().remove_window(*this); } -void WSWindow::set_title(String&& title) +void WSWindow::set_title(const String& title) { if (m_title == title) return; - m_title = move(title); + m_title = title; WSWindowManager::the().notify_title_changed(*this); } diff --git a/Servers/WindowServer/WSWindow.h b/Servers/WindowServer/WSWindow.h index 0d33fa07ef..072e64fca2 100644 --- a/Servers/WindowServer/WSWindow.h +++ b/Servers/WindowServer/WSWindow.h @@ -43,7 +43,7 @@ public: int window_id() const { return m_window_id; } String title() const { return m_title; } - void set_title(String&&); + void set_title(const String&); float opacity() const { return m_opacity; } void set_opacity(float opacity) { m_opacity = opacity; } |