]> git.mxchange.org Git - flightgear.git/commitdiff
Avoid compiler warning.
authorThorstenB <brehmt@gmail.com>
Fri, 21 Sep 2012 13:36:52 +0000 (15:36 +0200)
committerThorstenB <brehmt@gmail.com>
Fri, 21 Sep 2012 13:36:52 +0000 (15:36 +0200)
src/GUI/WaypointList.cxx
src/Navaids/FlightPlan.cxx

index 967b3496cc76f10d9a5025c0ccc5aa7a6bfcc464..20183d44ea314894ef63520ccb2ed7317d094734 100644 (file)
@@ -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);
     }
index b5ff28b455ba7a588e8ad4365ed194c9b72bc805..5f0c84eab6227ef61701c53ed4def190ac1f0549 100644 (file)
@@ -319,7 +319,7 @@ FlightPlan::Leg* FlightPlan::currentLeg() const
 
 FlightPlan::Leg* FlightPlan::previousLeg() const
 {
-  if (_currentIndex == 0) {
+  if (_currentIndex <= 0) {
     return NULL;
   }