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>bb10
parent
ae1f749e9e
commit
2a1c368c87
|
|
@ -384,7 +384,7 @@ void QXcbConnection::initializeScreens()
|
|||
}
|
||||
siblings << screen;
|
||||
}
|
||||
virtualDesktop->setScreens(siblings);
|
||||
virtualDesktop->setScreens(std::move(siblings));
|
||||
xcb_screen_next(&it);
|
||||
++xcbScreenNumber;
|
||||
} // for each xcb screen
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue