aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-09-15 09:44:46 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-09-15 09:44:46 +0900
commit51ebad8717dcda968dc30195d98545b4091ad251 (patch)
treea90054ab6a44fd9d63c6143a4290bf54bc041e92
parent87cb641e36fee7010766c73c32fa45115dec1a3c (diff)
downloadlibquotient-51ebad8717dcda968dc30195d98545b4091ad251.tar.gz
libquotient-51ebad8717dcda968dc30195d98545b4091ad251.zip
More compact fix with the same meaning
-rw-r--r--room.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/room.cpp b/room.cpp
index 9ed3f3d1..5b390cea 100644
--- a/room.cpp
+++ b/room.cpp
@@ -497,9 +497,8 @@ QString Room::Private::roomNameFromMemberNames(const QList<User *> &userlist) co
first_two.begin(), first_two.end(),
[this](const User* u1, const User* u2) {
// Filter out the "me" user so that it never hits the room name
- if( u1 == connection->user() || u2 == connection->user() )
- return u2 == connection->user();
- return u1->id() < u2->id();
+ return u2 == connection->user() ||
+ (u1 != connection->user() && u1->id() < u2->id());
}
);