Torsten Dreyer wrote:
Is that correct?
Certainly not! Fixed in CVS, thanks for reporting.

Torsten

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

I've been burned enough on unheeded warnings that I've made it a habit to eliminate all warnings in my code. I will be happy to (probably slowly) provide patches to do the same for FG, as long as they didn't annoy folks. If it's best left to active developers to do this, just say so.

The attached patch should remove the remaining bool conversion warnings in native_ctrls.cxx as reported by MS VC90. This patch should provide *no functional changes* to the application.


--- C:\FlightGearFresh\flightgear\src\Network\native_ctrls.cxx  Thu Aug 20 
07:37:22 2009
+++ C:\FlightGear\flightgear\src\Network\native_ctrls.cxx       Thu Aug 20 
07:34:15 2009
@@ -372,8 +372,8 @@
     // or
     node->setDoubleValue( "spoilers", net->spoilers );  //JWW
 //    cout << "NET->Spoilers: " << net->spoilers << endl;
-    fgSetBool( "/systems/electrical/outputs/flaps", net->flaps_power );
-    node->setBoolValue( "flaps-serviceable", net->flap_motor_ok );
+    fgSetBool( "/systems/electrical/outputs/flaps", net->flaps_power !=0);
+    node->setBoolValue( "flaps-serviceable", net->flap_motor_ok !=0 );
 
     for ( i = 0; i < FGNetCtrls::FG_MAX_ENGINES; ++i ) {
         // Controls
@@ -387,27 +387,27 @@
         node->getChild( "magnetos" )->setDoubleValue( net->magnetos[i] );
         node->getChild( "starter" )->setDoubleValue( net->starter_power[i] );
         node->getChild( "feed_tank" )->setIntValue( net->feed_tank_to[i] );
-        node->getChild( "reverser" )->setBoolValue( net->reverse[i] );
+        node->getChild( "reverser" )->setBoolValue( net->reverse[i] !=0 );
        // Faults
        SGPropertyNode *faults = node->getNode( "faults", true );
-       faults->setBoolValue( "serviceable", net->engine_ok[i] );
+       faults->setBoolValue( "serviceable", net->engine_ok[i] !=0 );
        faults->setBoolValue( "left-magneto-serviceable",
-                             net->mag_left_ok[i] );
+                             net->mag_left_ok[i] !=0 );
        faults->setBoolValue( "right-magneto-serviceable",
-                             net->mag_right_ok[i]);
+                             net->mag_right_ok[i] !=0);
        faults->setBoolValue( "spark-plugs-serviceable",
-                             net->spark_plugs_ok[i] );
+                             net->spark_plugs_ok[i] !=0 );
        faults->setIntValue( "oil-pressure-status", net->oil_press_status[i] );
-       faults->setBoolValue( "fuel-pump-serviceable", net->fuel_pump_ok[i] );
+       faults->setBoolValue( "fuel-pump-serviceable", net->fuel_pump_ok[i] !=0 
);
     }
 
     fgSetBool( "/systems/electrical/outputs/fuel-pump",
-               net->fuel_pump_power[0] );
+               net->fuel_pump_power[0] !=0 );
 
     for ( i = 0; i < FGNetCtrls::FG_MAX_TANKS; ++i ) {
         node = fgGetNode( "/controls/fuel/tank", i );
         node->getChild( "fuel_selector" )
-            ->setBoolValue( net->fuel_selector[i] );
+            ->setBoolValue( net->fuel_selector[i] !=0 );
 //        node->getChild( "to_tank" )->xfer_tank( i, net->xfer_to[i] );
     }
     node = fgGetNode( "/controls/gear" );
@@ -422,15 +422,15 @@
     }
 
     node = fgGetNode( "/controls/gear", true );
-    node->setBoolValue( "gear-down", net->gear_handle );
+    node->setBoolValue( "gear-down", net->gear_handle !=0 );
 //    node->setDoubleValue( "brake-parking", net->brake_parking );
 //    node->setDoubleValue( net->brake_left );
 //    node->setDoubleValue( net->brake_right );
 
     node = fgGetNode( "/controls/switches", true );
-    node->setBoolValue( "master-bat", net->master_bat );
-    node->setBoolValue( "master-alt", net->master_alt );
-    node->setBoolValue( "master-avionics", net->master_avionics );
+    node->setBoolValue( "master-bat", net->master_bat !=0 );
+    node->setBoolValue( "master-alt", net->master_alt !=0 );
+    node->setBoolValue( "master-avionics", net->master_avionics !=0 );
     
     node = fgGetNode( "/environment", true );
     node->setDoubleValue( "wind-speed-kt", net->wind_speed_kt );
@@ -456,9 +456,9 @@
 
     if ( honor_freezes ) {
         node = fgGetNode( "/sim/freeze", true );
-        node->setBoolValue( "master", net->freeze & 0x01 );
-        node->setBoolValue( "position", net->freeze & 0x02 );
-        node->setBoolValue( "fuel", net->freeze & 0x04 );
+        node->setBoolValue( "master", (net->freeze & 0x01) !=0 );
+        node->setBoolValue( "position", (net->freeze & 0x02) !=0 );
+        node->setBoolValue( "fuel", (net->freeze & 0x04) !=0 );
     }
 }
 
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to