summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.h
diff options
context:
space:
mode:
authorMikhail Svetkin <mikhail.svetkin@qt.io>2018-11-16 10:32:39 +0100
committerMikhail Svetkin <mikhail.svetkin@qt.io>2018-11-29 13:13:33 +0000
commit2a1c368c873afe9b222c759d4348b93beafca8ea (patch)
tree70a130a1cff9da31ae98b852db4f3f117624e00a /src/plugins/platforms/xcb/qxcbscreen.h
parentae1f749e9e25495e4ae1658289584adb74d0b076 (diff)
xcb: Use std::move and pass argument by rvalue reference
It will avoid a creation of temporary object and avoid copying. Change-Id: Ifae5f6f9e36bcb07f4bacc31f151f8adcfa621a3 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 7f22a8e4db..be6c45e415 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -79,7 +79,7 @@ public:
QXcbScreen *screenAt(const QPoint &pos) const;
QList<QPlatformScreen *> screens() const { return m_screens; }
- void setScreens(QList<QPlatformScreen *> sl) { m_screens = sl; }
+ void setScreens(QList<QPlatformScreen *> &&sl) { m_screens = std::move(sl); }
void removeScreen(QPlatformScreen *s) { m_screens.removeOne(s); }
void addScreen(QPlatformScreen *s);
void setPrimaryScreen(QPlatformScreen *s);