From 796d78dccef1a32e35f7d24feb83cd846c55e2d2 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 22 Jun 2022 20:00:00 +0200 Subject: RoomSummary::merge(): explicitly cast between int and bool Honestly, it was quite intuitive even without that, but in reality there are implicit conversion under the wraps. This commit makes them explicit, for clarity. --- lib/syncdata.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index ff3dc0c2..93416bc4 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -18,9 +18,10 @@ bool RoomSummary::isEmpty() const bool RoomSummary::merge(const RoomSummary& other) { // Using bitwise OR to prevent computation shortcut. - return joinedMemberCount.merge(other.joinedMemberCount) - | invitedMemberCount.merge(other.invitedMemberCount) - | heroes.merge(other.heroes); + return static_cast( + static_cast(joinedMemberCount.merge(other.joinedMemberCount)) + | static_cast(invitedMemberCount.merge(other.invitedMemberCount)) + | static_cast(heroes.merge(other.heroes))); } QDebug Quotient::operator<<(QDebug dbg, const RoomSummary& rs) -- cgit v1.2.3