From 2ad51e7a0eb4539c6a99acd000de1e1c188e8f99 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 12 Feb 2018 14:43:31 +0100 Subject: [PATCH] Fix operator< of ChatRoomId. --- src/chat/chat-room/chat-room-id.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chat/chat-room/chat-room-id.cpp b/src/chat/chat-room/chat-room-id.cpp index 5ffe44697..8ff0b8d35 100644 --- a/src/chat/chat-room/chat-room-id.cpp +++ b/src/chat/chat-room/chat-room-id.cpp @@ -61,7 +61,8 @@ bool ChatRoomId::operator!= (const ChatRoomId &chatRoomId) const { bool ChatRoomId::operator< (const ChatRoomId &chatRoomId) const { L_D(); const ChatRoomIdPrivate *dChatRoomId = chatRoomId.getPrivate(); - return d->peerAddress < dChatRoomId->peerAddress || d->localAddress < dChatRoomId->localAddress; + return d->peerAddress < dChatRoomId->peerAddress + || (d->peerAddress == dChatRoomId->peerAddress && d->localAddress < dChatRoomId->localAddress); } const IdentityAddress &ChatRoomId::getPeerAddress () const {