UI: TaskInfoZoneDownloader: Fix PVS-Studio warning.

V669 The 'zonesMask' argument is a non-constant reference. The analyzer is unable to determine the position at which this argument is being modified. It is possible that the function contains an error. taskinfozonedownloader.cpp 206
This commit is contained in:
Nodir Temirkhodjaev 2021-06-23 09:49:28 +03:00
parent cb545cdecd
commit b5fac204ad
2 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ void TaskInfoZoneDownloader::insertZoneId(quint32 &zonesMask, int zoneId)
zonesMask |= (quint32(1) << (zoneId - 1));
}
bool TaskInfoZoneDownloader::containsZoneId(quint32 &zonesMask, int zoneId) const
bool TaskInfoZoneDownloader::containsZoneId(quint32 zonesMask, int zoneId) const
{
return (zonesMask & (quint32(1) << (zoneId - 1))) != 0;
}

View File

@ -42,7 +42,7 @@ private:
void addSubResult(TaskZoneDownloader *worker, bool success);
void insertZoneId(quint32 &zonesMask, int zoneId);
bool containsZoneId(quint32 &zonesMask, int zoneId) const;
bool containsZoneId(quint32 zonesMask, int zoneId) const;
void emitZonesUpdated();