]> git.mxchange.org Git - flightgear.git/commitdiff
Fix some warnings from new Xcode.
authorJames Turner <zakalawe@mac.com>
Fri, 20 Dec 2013 12:42:12 +0000 (12:42 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 20 Dec 2013 12:42:12 +0000 (12:42 +0000)
finite is deprecated, use C99 isfinite as recommended.

src/AIModel/AIAircraft.cxx
src/AIModel/AIShip.cxx

index 509fa5f6ace4d4d9b2fd6ebe1976cc6207912eec..bb54085bc659e4e1db96d3c5a41d6aa02a8f52d1 100644 (file)
@@ -945,7 +945,7 @@ void FGAIAircraft::controlHeading(FGAIWaypoint* curr) {
         SG_NORMALIZE_RANGE(calc_bearing, 0.0, 360.0);
     }
 
-    if (finite(calc_bearing)) {
+    if (std::isfinite(calc_bearing)) {
         double hdg_error = calc_bearing - tgt_heading;
         if (fabs(hdg_error) > 0.01) {
             TurnTo( calc_bearing );
index a202feb48b677748193e236c046d050078ea7475..fed867be11a9ca77f7f605f9acfb9a881bb90ac2 100644 (file)
@@ -792,7 +792,7 @@ void FGAIShip::ProcessFlightPlan(double dt) {
     //   now revise the required course for the next way point
     _course = getCourse(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr->getLatitude(), curr->getLongitude());
 
-    if (finite(_course))
+    if (std::isfinite(_course))
         TurnTo(_course);
     else
         SG_LOG(SG_AI, SG_ALERT, "AIShip: Bearing or Range is not a finite number");