From 2003e7cf2aaadc30a0cc82acb00227ec72388cf2 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 21 Sep 2012 15:36:52 +0200 Subject: [PATCH] Avoid compiler warning. --- src/GUI/WaypointList.cxx | 2 +- src/Navaids/FlightPlan.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }