1
0
Fork 0

Fix some warnings from new Xcode.

finite is deprecated, use C99 isfinite as recommended.
This commit is contained in:
James Turner 2013-12-20 12:42:12 +00:00
parent 4427ee7406
commit b3dbfe21fe
2 changed files with 2 additions and 2 deletions

View 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 );

View 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");