aboutsummaryrefslogtreecommitdiff
path: root/lib/syncdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r--lib/syncdata.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp
index 70c4a15f..a3809469 100644
--- a/lib/syncdata.cpp
+++ b/lib/syncdata.cpp
@@ -184,11 +184,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; int(i) < rooms.size() && i < JoinStateStrings.size();
- ++i) {
+ for (size_t i = 0; i < JoinStateStrings.size(); ++i) {
// This assumes that JoinState values go over powers of 2: 1,2,4,...
const auto joinState = JoinState(1U << i);
const auto rs = rooms.value(JoinStateStrings[i]).toObject();