From dac00efbc75fd774bb0e6eb790aa868ab8ae3de4 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Mon, 2 Jan 2012 23:13:51 +0100 Subject: [PATCH] Fix some compiler warnings. Comment out unused code. --- src/AIModel/AIShip.cxx | 3 ++- src/FDM/YASim/Rotor.cpp | 3 +++ src/Instrumentation/KLN89/kln89.cxx | 6 ++++-- src/Main/CameraGroup.cxx | 7 ++++--- src/Radio/itm.cpp | 7 ++++--- src/Time/light.cxx | 13 ++++++------- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx index df0ce649b..5cf94f19d 100644 --- a/src/AIModel/AIShip.cxx +++ b/src/AIModel/AIShip.cxx @@ -251,6 +251,7 @@ void FGAIShip::unbind() { props->untie("velocities/speed-kts"); } + void FGAIShip::update(double dt) { //SG_LOG(SG_AI, SG_ALERT, "updating Ship: " << _name <get_sim_time_sec()); diff --git a/src/FDM/YASim/Rotor.cpp b/src/FDM/YASim/Rotor.cpp index 1231cf6b8..79e5fd128 100644 --- a/src/FDM/YASim/Rotor.cpp +++ b/src/FDM/YASim/Rotor.cpp @@ -1543,6 +1543,8 @@ void Rotorgear::calcForces(float* torqueOut) } total_torque*=-1; _ddt_omegarel=0; + +#if 0 float rel_torque_engine=1; if (total_torque<=0) rel_torque_engine=0; @@ -1551,6 +1553,7 @@ void Rotorgear::calcForces(float* torqueOut) rel_torque_engine=1/max_torque_of_engine*total_torque; else rel_torque_engine=0; +#endif //add the rotor brake and the gear fritcion float dt=0.1f; diff --git a/src/Instrumentation/KLN89/kln89.cxx b/src/Instrumentation/KLN89/kln89.cxx index c2212a99f..75e6a7f84 100644 --- a/src/Instrumentation/KLN89/kln89.cxx +++ b/src/Instrumentation/KLN89/kln89.cxx @@ -727,9 +727,11 @@ static double gps_min(const double &a, const double &b) { return(a <= b ? a : b); } +#if 0 static double gps_max(const double &a, const double &b) { return(a >= b ? a : b); } +#endif void KLN89::UpdateMapHeading() { switch(_mapOrientation) { @@ -762,8 +764,8 @@ void KLN89::DrawMap(bool draw_avs) { // TODO - use an aligned projection when either DTK or TK up! FGATCAlignedProjection mapProj(SGGeod::fromRad(_gpsLon, _gpsLat), _mapHeading); double meter_per_pix = (_mapOrientation == 0 ? mapScaleMeters / 20.0f : mapScaleMeters / 29.0f); - SGGeod bottomLeft = mapProj.ConvertFromLocal(SGVec3d(gps_max(-57.0 * meter_per_pix, -50000), gps_max((_mapOrientation == 0 ? -20.0 * meter_per_pix : -11.0 * meter_per_pix), -25000), 0.0)); - SGGeod topRight = mapProj.ConvertFromLocal(SGVec3d(gps_min(54.0 * meter_per_pix, 50000), gps_min((_mapOrientation == 0 ? 20.0 * meter_per_pix : 29.0 * meter_per_pix), 25000), 0.0)); +// SGGeod bottomLeft = mapProj.ConvertFromLocal(SGVec3d(gps_max(-57.0 * meter_per_pix, -50000), gps_max((_mapOrientation == 0 ? -20.0 * meter_per_pix : -11.0 * meter_per_pix), -25000), 0.0)); +// SGGeod topRight = mapProj.ConvertFromLocal(SGVec3d(gps_min(54.0 * meter_per_pix, 50000), gps_min((_mapOrientation == 0 ? 20.0 * meter_per_pix : 29.0 * meter_per_pix), 25000), 0.0)); diff --git a/src/Main/CameraGroup.cxx b/src/Main/CameraGroup.cxx index fccba809c..135c67604 100644 --- a/src/Main/CameraGroup.cxx +++ b/src/Main/CameraGroup.cxx @@ -456,9 +456,9 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh( bool flip = false; bool texcoord_flip = false; +#if 0 osg::Vec3d projector = eye - osg::Vec3d(0.0,0.0, distance); -#if 0 OSG_INFO<<"createParoramicSphericalDisplayDistortionMesh : Projector position = "<