mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Fix cppcheck warnings
This commit is contained in:
@@ -52,18 +52,18 @@ namespace BlackMisc::Aviation
|
||||
lights.setBeaconOn(true);
|
||||
lights.setNavOn(true);
|
||||
|
||||
if (gsKts > 5)
|
||||
{
|
||||
// mode taxi
|
||||
lights.setTaxiOn(true);
|
||||
lights.setLandingOn(false);
|
||||
}
|
||||
else if (gsKts > 30)
|
||||
if (gsKts > 30)
|
||||
{
|
||||
// mode accelaration for takeoff
|
||||
lights.setTaxiOn(false);
|
||||
lights.setLandingOn(true);
|
||||
}
|
||||
else if (gsKts > 5)
|
||||
{
|
||||
// mode taxi
|
||||
lights.setTaxiOn(true);
|
||||
lights.setLandingOn(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// slow movements or parking
|
||||
|
||||
@@ -748,7 +748,7 @@ namespace BlackMisc::Aviation
|
||||
if (firstSplit.size() >= 2)
|
||||
{
|
||||
// format like B789/H-SDE1E2E3FGHIJ2J3J4J5M1RWXY/LB1D1
|
||||
QString equipment = firstSplit.size() >= 2 ? firstSplit[1] : "";
|
||||
QString equipment = firstSplit[1];
|
||||
QStringList split = firstSplit[0].split('/');
|
||||
if (split.size() >= 3)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace BlackMisc::Aviation
|
||||
if ((p3 = CSelcal::validCharacters().indexOf(codeUpper.at(2))) < 0) return false;
|
||||
if ((p4 = CSelcal::validCharacters().indexOf(codeUpper.at(3))) < 0) return false;
|
||||
if (p1 >= p2 || p3 >= p4) return false; // pair in alphabetical order
|
||||
if (p1 == p3 || p2 == p3 || p2 == p4 || p3 == p4) return false; // given letter can be used only once in a SELCAL code
|
||||
if (p1 == p3 || p2 == p3 || p2 == p4 || p3 == p4) return false; // cppcheck-suppress knownConditionTrueFalse // given letter can be used only once in a SELCAL code
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user