From 3626b6c0a9e6e16051139384b08b85b0da4fe4cd Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sun, 21 Feb 2021 15:50:28 -0600 Subject: [PATCH] Maintenance: FlightPlan convert to size_t --- src/Navaids/FlightPlan.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Navaids/FlightPlan.cxx b/src/Navaids/FlightPlan.cxx index 79ec67bb2..e90d2241e 100644 --- a/src/Navaids/FlightPlan.cxx +++ b/src/Navaids/FlightPlan.cxx @@ -2143,9 +2143,9 @@ void FlightPlan::forEachLeg(const LegVisitor& lv) int FlightPlan::indexOfFirstNonDepartureWaypoint() const { const auto numLegs = _legs.size(); - for (int i = 0; i < numLegs; ++i) { + for (size_t i = 0; i < numLegs; ++i) { if (!(_legs.at(i)->waypoint()->flags() & WPT_DEPARTURE)) - return i ; + return static_cast(i); } // all waypoints are marked as departure @@ -2155,9 +2155,9 @@ int FlightPlan::indexOfFirstNonDepartureWaypoint() const int FlightPlan::indexOfFirstArrivalWaypoint() const { const auto numLegs = _legs.size(); - for (int i = 0; i < numLegs; ++i) { + for (size_t i = 0; i < numLegs; ++i) { if (_legs.at(i)->waypoint()->flags() & WPT_ARRIVAL) - return i; + return static_cast(i); } // no waypoints are marked as arrival @@ -2167,9 +2167,9 @@ int FlightPlan::indexOfFirstArrivalWaypoint() const int FlightPlan::indexOfFirstApproachWaypoint() const { const auto numLegs = _legs.size(); - for (int i = 0; i < numLegs; ++i) { + for (size_t i = 0; i < numLegs; ++i) { if (_legs.at(i)->waypoint()->flags() & WPT_APPROACH) - return i; + return static_cast(i); } // no waypoints are marked as arrival