mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
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.
This commit is contained in:
parent
23e6c45e87
commit
dddf45f563
11 changed files with 18 additions and 18 deletions
|
@ -830,12 +830,12 @@ void Terminal::paint_event(GPaintEvent& event)
|
|||
painter.draw_rect(frame_inner_rect(), Color::Red);
|
||||
}
|
||||
|
||||
void Terminal::set_window_title(String&& title)
|
||||
void Terminal::set_window_title(const String& title)
|
||||
{
|
||||
auto* w = window();
|
||||
if (!w)
|
||||
return;
|
||||
w->set_title(move(title));
|
||||
w->set_title(title);
|
||||
}
|
||||
|
||||
void Terminal::invalidate_cursor()
|
||||
|
|
|
@ -40,7 +40,7 @@ private:
|
|||
void set_cursor(unsigned row, unsigned column);
|
||||
void put_character_at(unsigned row, unsigned column, byte ch);
|
||||
void invalidate_cursor();
|
||||
void set_window_title(String&&);
|
||||
void set_window_title(const String&);
|
||||
|
||||
void inject_string(const String&);
|
||||
void unimplemented_escape();
|
||||
|
|
|
@ -35,11 +35,11 @@ GCheckBox::~GCheckBox()
|
|||
{
|
||||
}
|
||||
|
||||
void GCheckBox::set_caption(String&& caption)
|
||||
void GCheckBox::set_caption(const String& caption)
|
||||
{
|
||||
if (caption == m_caption)
|
||||
return;
|
||||
m_caption = move(caption);
|
||||
m_caption = caption;
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ public:
|
|||
virtual ~GCheckBox() override;
|
||||
|
||||
String caption() const { return m_caption; }
|
||||
void set_caption(String&&);
|
||||
void set_caption(const String&);
|
||||
|
||||
bool is_checked() const { return m_checked; }
|
||||
void set_checked(bool);
|
||||
|
|
|
@ -26,9 +26,9 @@ GStatusBar::~GStatusBar()
|
|||
{
|
||||
}
|
||||
|
||||
void GStatusBar::set_text(String&& text)
|
||||
void GStatusBar::set_text(const String& text)
|
||||
{
|
||||
m_label->set_text(move(text));
|
||||
m_label->set_text(text);
|
||||
}
|
||||
|
||||
String GStatusBar::text() const
|
||||
|
|
|
@ -11,7 +11,7 @@ public:
|
|||
virtual ~GStatusBar() override;
|
||||
|
||||
String text() const;
|
||||
void set_text(String&&);
|
||||
void set_text(const String&);
|
||||
|
||||
virtual const char* class_name() const override { return "GStatusBar"; }
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue