]> git.mxchange.org Git - flightgear.git/commitdiff
Fix some compiler warnings.
authorThorstenB <brehmt@gmail.com>
Mon, 2 Jan 2012 22:13:51 +0000 (23:13 +0100)
committerThorstenB <brehmt@gmail.com>
Mon, 2 Jan 2012 22:16:17 +0000 (23:16 +0100)
Comment out unused code.

src/AIModel/AIShip.cxx
src/FDM/YASim/Rotor.cpp
src/Instrumentation/KLN89/kln89.cxx
src/Main/CameraGroup.cxx
src/Radio/itm.cpp
src/Time/light.cxx

index df0ce649ba8369104c17e83c213cd25a333817a5..5cf94f19dc97c35f1046180cbd83cf7ae942cba6 100644 (file)
@@ -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 <<hdg<<pitch<<roll);
     // For computation of rotation speeds we just use finite differences here.
@@ -265,7 +266,7 @@ void FGAIShip::update(double dt) {
     // local frame
     SGQuatd ec2body = ec2hl*hl2body;
     // The cartesian position of the ship in the wgs84 world
-    SGVec3d cartPos = SGVec3d::fromGeod(pos);
+    //SGVec3d cartPos = SGVec3d::fromGeod(pos);
 
     // The simulation time this transform is meant for
     aip.setReferenceTime(globals->get_sim_time_sec());
index 1231cf6b8a126e796b96457c999f3cb944a0c829..79e5fd128ebc975304296913534d06d4b348eb17 100644 (file)
@@ -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;
index c2212a99f6f3b26f924e67c323ba456733166e7c..75e6a7f8401efbeab0be11446be4431719207016 100644 (file)
@@ -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));
 
 
 
index fccba809cd942015d1621f60519519ccf963d147..135c67604229516763e68e0681fabb9a0e7ae355 100644 (file)
@@ -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 = "<<projector<<std::endl;
     OSG_INFO<<"createParoramicSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
 #endif
@@ -482,10 +482,11 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(
     osg::Vec2Array* texcoords1 = intensityMap==0 ? new osg::Vec2Array : 0;
     osg::Vec4Array* colors = new osg::Vec4Array;
 
+#if 0
     osg::Vec3 bottom = origin;
     osg::Vec3 dx = xAxis*(width/((float)(noSteps-2)));
     osg::Vec3 dy = yAxis*(height/((float)(noSteps-1)));
-
+#endif
     osg::Vec3 top = origin + yAxis*height;
 
     osg::Vec3 screenCenter = origin + widthVector*0.5f + heightVector*0.5f;
@@ -495,7 +496,7 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(
 
     for(int i=0;i<noSteps;++i)
     {
-        osg::Vec3 cursor = bottom+dy*(float)i;
+        //osg::Vec3 cursor = bottom+dy*(float)i;
         for(int j=0;j<noSteps;++j)
         {
             osg::Vec2 texcoord(double(i)/double(noSteps-1), double(j)/double(noSteps-1));
index 8f75162ce6263f8b7b6aef8d4cedf232a1881eb9..1ad10d4d8f60e97a69fc8c376c6d63932082849b 100644 (file)
@@ -1552,7 +1552,6 @@ void point_to_point(double elev[],
        double zc, zr;
        double q = eno;
        long ja, jb, i, np;
-       double dkm, xkm;
        double fs;
 
        prop.h_g[0] = tht_m;          // Tx height above ground level
@@ -1564,8 +1563,10 @@ void point_to_point(double elev[],
        zc = qerfi(conf);
        zr = qerfi(rel);
        np = (long)elev[0];
-       dkm = (elev[1] * elev[0]) / 1000.0;
-       xkm = elev[1] / 1000.0;
+#if 0
+       double dkm = (elev[1] * elev[0]) / 1000.0;
+       double xkm = elev[1] / 1000.0;
+#endif
 
        ja = (long)(3.0 + 0.1 * elev[0]);
        jb = np - ja + 6;
index d12d6704935375aaf73bd98bb866c13d6f256535..2dfbbbc3c3a74c063b9d5ea016ab13d0e96674dc 100644 (file)
@@ -330,10 +330,10 @@ void FGLight::update_sky_color () {
 // calculate fog color adjusted for sunrise/sunset effects
 void FGLight::update_adj_fog_color () {
 
-    double pitch = globals->get_current_view()->getPitch_deg()
-                     * SGD_DEGREES_TO_RADIANS;
-    double pitch_offset = globals->get_current_view()-> getPitchOffset_deg()
-                     * SGD_DEGREES_TO_RADIANS;
+//    double pitch = globals->get_current_view()->getPitch_deg()
+//                     * SGD_DEGREES_TO_RADIANS;
+//    double pitch_offset = globals->get_current_view()-> getPitchOffset_deg()
+//                     * SGD_DEGREES_TO_RADIANS;
     double heading = globals->get_current_view()->getHeading_deg()
                      * SGD_DEGREES_TO_RADIANS;
     double heading_offset = globals->get_current_view()->getHeadingOffset_deg()
@@ -360,13 +360,12 @@ void FGLight::update_adj_fog_color () {
        return;
     }
 
-    double hor_rotation, vert_rotation;
     static float gamma = system_gamma;
 
     // first determine the difference between our view angle and local
     // direction to the sun
-    vert_rotation = pitch + pitch_offset;
-    hor_rotation = -(_sun_rotation + SGD_PI) - heading + heading_offset;
+    //double vert_rotation = pitch + pitch_offset;
+    double hor_rotation = -(_sun_rotation + SGD_PI) - heading + heading_offset;
     if (hor_rotation < 0 )
        hor_rotation = fmod(hor_rotation, SGD_2PI) + SGD_2PI;
     else