From: ThorstenB Date: Fri, 21 Sep 2012 13:36:52 +0000 (+0200) Subject: Avoid compiler warning. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2003e7cf2aaadc30a0cc82acb00227ec72388cf2;p=flightgear.git Avoid compiler warning. --- diff --git a/src/GUI/WaypointList.cxx b/src/GUI/WaypointList.cxx index 967b3496c..20183d44e 100644 --- a/src/GUI/WaypointList.cxx +++ b/src/GUI/WaypointList.cxx @@ -96,7 +96,7 @@ public: _fp->deleteIndex(srcIndex); _fp->insertWayptAtIndex(w, destIndex); - if (srcIndex == currentWpIndex) { + if ((signed int) srcIndex == currentWpIndex) { // current waypoint was moved _fp->setCurrentIndex(destIndex); } diff --git a/src/Navaids/FlightPlan.cxx b/src/Navaids/FlightPlan.cxx index b5ff28b45..5f0c84eab 100644 --- a/src/Navaids/FlightPlan.cxx +++ b/src/Navaids/FlightPlan.cxx @@ -319,7 +319,7 @@ FlightPlan::Leg* FlightPlan::currentLeg() const FlightPlan::Leg* FlightPlan::previousLeg() const { - if (_currentIndex == 0) { + if (_currentIndex <= 0) { return NULL; }