Fix operator< of ChatRoomId.

This commit is contained in:
Ghislain MARY 2018-02-12 14:43:31 +01:00
parent ace638771e
commit 2ad51e7a0e

View file

@ -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 {