From 4d977e941155b484a047f766e1eaff716ae7dcca Mon Sep 17 00:00:00 2001 From: torsten Date: Thu, 20 Aug 2009 21:53:29 +0000 Subject: [PATCH] warning fixes --- src/Environment/environment_ctrl.cxx | 7 ++++--- src/Environment/ridge_lift.cxx | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index 366a794c9..008729be6 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -264,11 +264,11 @@ FGInterpolateEnvironmentCtrl::bucket::lessThan(bucket *a, bucket *b) //////////////////////////////////////////////////////////////////////// FGMetarCtrl::FGMetarCtrl( SGSubsystem * environmentCtrl ) - : _environmentCtrl(environmentCtrl), - station_elevation_ft(0.0), + : metar_valid(false), setup_winds_aloft(true), wind_interpolation_required(true), + station_elevation_ft(0.0), // Interpolation constant definitions. EnvironmentUpdatePeriodSec( 0.2 ), MaxWindChangeKtsSec( 0.2 ), @@ -277,7 +277,8 @@ FGMetarCtrl::FGMetarCtrl( SGSubsystem * environmentCtrl ) MaxCloudAltitudeChangeFtSec( 20.0 ), MaxCloudThicknessChangeFtSec( 50.0 ), MaxCloudInterpolationHeightFt( 5000.0 ), - MaxCloudInterpolationDeltaFt( 4000.0 ) + MaxCloudInterpolationDeltaFt( 4000.0 ), + _environmentCtrl(environmentCtrl) { windModulator = new FGBasicWindModulator(); diff --git a/src/Environment/ridge_lift.cxx b/src/Environment/ridge_lift.cxx index 4a371a3ae..1dd5cb26e 100644 --- a/src/Environment/ridge_lift.cxx +++ b/src/Environment/ridge_lift.cxx @@ -174,7 +174,7 @@ void FGRidgeLift::update(double dt) { double ground_wind_from_rad = _surface_wind_from_deg_node->getDoubleValue() * SG_DEGREES_TO_RADIANS + SG_PI; // compute the remaining probes - for (int i = 1; i < sizeof(probe_elev_m)/sizeof(probe_elev_m[0]); i++) { + for (unsigned i = 1; i < sizeof(probe_elev_m)/sizeof(probe_elev_m[0]); i++) { SGGeoc probe = myGeocPos.advanceRadM( ground_wind_from_rad, dist_probe_m[i] ); // convert to geodetic position for ground level computation SGGeod probeGeod = SGGeod::fromGeoc( probe ); @@ -193,7 +193,7 @@ void FGRidgeLift::update(double dt) { slope[2] = (probe_elev_m[2] - probe_elev_m[3]) / dist_probe_m[3]; slope[3] = (probe_elev_m[4] - probe_elev_m[0]) / -dist_probe_m[4]; - for (int i = 0; i < sizeof(slope)/sizeof(slope[0]); i++) + for (unsigned i = 0; i < sizeof(slope)/sizeof(slope[0]); i++) adj_slope[i] = sin(atan(5.0 * pow ( (fabs(slope[i])),1.7) ) ) *sign(slope[i]); //adjustment