diff options
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r-- | lib/syncdata.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index 3e0eff17..e86d3100 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -178,12 +178,7 @@ void SyncData::parseJson(const QJsonObject& json, const QString& baseDir) auto rooms = json.value("rooms"_ls).toObject(); auto totalRooms = 0; auto totalEvents = 0; - // The first comparison shortcuts the loop when not all states are there - // in the response (anything except "join" is only occasional, and "join" - // intentionally comes first in the enum). - for (size_t i = 0; - static_cast<int>(i) < rooms.size() && i < JoinStateStrings.size(); ++i) - { + for (size_t i = 0; i < JoinStateStrings.size(); ++i) { // This assumes that MemberState values go over powers of 2: 1,2,4,... const auto joinState = JoinState(1U << i); const auto rs = rooms.value(JoinStateStrings[i]).toObject(); |