Ref T261, utility functions in value classes

* set offset values
* do not change PQs if PQ is null
* sorted by callsign
This commit is contained in:
Klaus Basan
2018-05-07 01:51:45 +02:00
committed by Roland Winklmeier
parent 3f4cb7529c
commit 8e3b55b4ca
9 changed files with 47 additions and 15 deletions

View File

@@ -349,13 +349,16 @@ namespace BlackMisc
return c;
}
void CAircraftSituationList::addAltitudeOffset(const CLength &offset)
int CAircraftSituationList::addAltitudeOffset(const CLength &offset)
{
if (offset.isNull() || this->isEmpty()) { return; }
if (offset.isNull() || this->isEmpty()) { return 0; }
int c = 0;
for (CAircraftSituation &s : *this)
{
s.addAltitudeOffset(offset);
c++;
}
return c;
}
bool CAircraftSituationList::isSortedAdjustedLatestFirstWithoutNullPositions() const