Skip to content

Commit

Permalink
[TASK] stop assuming multiple pilots per callsign in WhazzupData
Browse files Browse the repository at this point in the history
QHash hasn't handled multi-values in Qt5 anyways.
This gets rid of the last compiler warnings we had. :)
  • Loading branch information
jonaseberle committed May 30, 2023
1 parent 7dff32c commit a2414ed
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/WhazzupData.cpp
Expand Up @@ -343,9 +343,7 @@ void WhazzupData::updatePilotsFrom(const WhazzupData &data) {
qDebug() << "WhazzupData::updatePilotsFrom()";
foreach (const QString s, pilots.keys()) { // remove pilots that are no longer there
if (!data.pilots.contains(s)) {
foreach (const Pilot* p, pilots.values(s)) { // there might be several...
delete p;
}
delete pilots.value(s);
pilots.remove(s);
}
}
Expand All @@ -368,9 +366,7 @@ void WhazzupData::updatePilotsFrom(const WhazzupData &data) {

foreach (const QString s, bookedPilots.keys()) { // remove pilots that are no longer there
if (!data.bookedPilots.contains(s)) {
foreach (const Pilot* p, bookedPilots.values(s)) { // there might be several...
delete p;
}
delete bookedPilots.value(s);
bookedPilots.remove(s);
}
}
Expand Down

0 comments on commit a2414ed

Please sign in to comment.