From b3dbfe21fe1bcd59ce186dbc1833ef2b65eadf75 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 20 Dec 2013 12:42:12 +0000 Subject: [PATCH] Fix some warnings from new Xcode. finite is deprecated, use C99 isfinite as recommended. --- src/AIModel/AIAircraft.cxx | 2 +- src/AIModel/AIShip.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AIModel/AIAircraft.cxx b/src/AIModel/AIAircraft.cxx index 509fa5f6a..bb54085bc 100644 --- a/src/AIModel/AIAircraft.cxx +++ b/src/AIModel/AIAircraft.cxx @@ -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 ); diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx index a202feb48..fed867be1 100644 --- a/src/AIModel/AIShip.cxx +++ b/src/AIModel/AIShip.cxx @@ -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"); -- 2.39.5