aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-01 16:46:53 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-01 20:47:00 +0900
commit5c61bb08e3fe87591884e0440a85d64482500199 (patch)
tree5542844c5aff5e38b9ef07c9f588eb0004297fa0 /lib
parent68957eace7f840fffe7442f1d50d3793422bc152 (diff)
downloadlibquotient-5c61bb08e3fe87591884e0440a85d64482500199.tar.gz
libquotient-5c61bb08e3fe87591884e0440a85d64482500199.zip
Room: endorse std::move
That is, add "using std::move" and strip std:: from actual usages.
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 1fa9212e..670c7d7c 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -55,6 +55,7 @@
using namespace QMatrixClient;
using namespace std::placeholders;
+using std::move;
#if !(defined __GLIBCXX__ && __GLIBCXX__ <= 20150123)
using std::llround;
#endif
@@ -74,7 +75,7 @@ class Room::Private
typedef QMultiHash<QString, User*> members_map_t;
Private(Connection* c, QString id_, JoinState initialJoinState)
- : q(nullptr), connection(c), id(std::move(id_))
+ : q(nullptr), connection(c), id(move(id_))
, joinState(initialJoinState)
{ }
@@ -228,7 +229,7 @@ class Room::Private
RoomEventPtr TimelineItem::replaceEvent(RoomEventPtr&& other)
{
- return std::exchange(evt, std::move(other));
+ return std::exchange(evt, move(other));
}
Room::Room(Connection* connection, QString id, JoinState initialJoinState)
@@ -1389,7 +1390,7 @@ void Room::Private::addNewMessageEvents(RoomEvents&& events)
if (!normalEvents.empty())
emit q->aboutToAddNewMessages(normalEvents);
- const auto insertedSize = insertEvents(std::move(normalEvents), Newer);
+ const auto insertedSize = insertEvents(move(normalEvents), Newer);
const auto from = timeline.cend() - insertedSize;
if (insertedSize > 0)
{
@@ -1436,7 +1437,7 @@ void Room::Private::addHistoricalMessageEvents(RoomEvents&& events)
return;
emit q->aboutToAddHistoricalMessages(normalEvents);
- const auto insertedSize = insertEvents(std::move(normalEvents), Older);
+ const auto insertedSize = insertEvents(move(normalEvents), Older);
const auto from = timeline.crend() - insertedSize;
qCDebug(MAIN) << "Room" << displayname << "received" << insertedSize