]> git.mxchange.org Git - flightgear.git/commitdiff
MSVC patches from Christian Mayer.
authorcurt <curt>
Sun, 9 Dec 2001 05:20:13 +0000 (05:20 +0000)
committercurt <curt>
Sun, 9 Dec 2001 05:20:13 +0000 (05:20 +0000)
src/Main/fg_props.cxx
src/Sound/fg_fx.cxx

index 6bcf7f0bd77616733798936ca3d8f89c997e53b0..5218ab7ac26f22fa461171f45eacccc264e28fb7 100644 (file)
@@ -123,26 +123,27 @@ _set_view_from_axes ()
 struct LogClassMapping {
   sgDebugClass c;
   string name;
+  LogClassMapping(sgDebugClass cc, string nname) { c = cc; name = nname; }
 };
 
 LogClassMapping log_class_mappings [] = {
-  {SG_NONE, "none"},
-  {SG_TERRAIN, "terrain"},
-  {SG_ASTRO, "astro"},
-  {SG_FLIGHT, "flight"},
-  {SG_INPUT, "input"},
-  {SG_GL, "gl"},
-  {SG_VIEW, "view"},
-  {SG_COCKPIT, "cockpit"},
-  {SG_GENERAL, "general"},
-  {SG_MATH, "math"},
-  {SG_EVENT, "event"},
-  {SG_AIRCRAFT, "aircraft"},
-  {SG_AUTOPILOT, "autopilot"},
-  {SG_IO, "io"},
-  {SG_CLIPPER, "clipper"},
-  {SG_NETWORK, "network"},
-  {SG_UNDEFD, ""}
+  LogClassMapping(SG_NONE, "none"),
+  LogClassMapping(SG_TERRAIN, "terrain"),
+  LogClassMapping(SG_ASTRO, "astro"),
+  LogClassMapping(SG_FLIGHT, "flight"),
+  LogClassMapping(SG_INPUT, "input"),
+  LogClassMapping(SG_GL, "gl"),
+  LogClassMapping(SG_VIEW, "view"),
+  LogClassMapping(SG_COCKPIT, "cockpit"),
+  LogClassMapping(SG_GENERAL, "general"),
+  LogClassMapping(SG_MATH, "math"),
+  LogClassMapping(SG_EVENT, "event"),
+  LogClassMapping(SG_AIRCRAFT, "aircraft"),
+  LogClassMapping(SG_AUTOPILOT, "autopilot"),
+  LogClassMapping(SG_IO, "io"),
+  LogClassMapping(SG_CLIPPER, "clipper"),
+  LogClassMapping(SG_NETWORK, "network"),
+  LogClassMapping(SG_UNDEFD, "")
 };
 
 
index 370d23c033d0b2b0c201397d5b2c03f752156dcb..96d8d9a966598d820dc78f15eccce95bda897dab 100644 (file)
@@ -85,11 +85,12 @@ void
 FGFX::init ()
 {
   FGSoundMgr * mgr = globals->get_soundmgr();
+  int i;
 
   //
   // Create and add engine-related sounds.
   //
-  for (int i = 0; i < MAX_ENGINES; i++) {
+  for (i = 0; i < MAX_ENGINES; i++) {
                                // Engine
     _engine[i] =
       new FGSimpleSound(fgGetString("/sim/sounds/engine/path",
@@ -181,7 +182,7 @@ FGFX::init ()
   // Grab some properties.
   ////////////////////////////////////////////////////////////////////
 
-  for (int i = 0; i < MAX_ENGINES; i++) {
+  for (i = 0; i < MAX_ENGINES; i++) {
     char buf[100];
     sprintf(buf, "/engines/engine[%d]/running", i);
     _engine_running_prop[i] = fgGetNode(buf, true);
@@ -208,13 +209,13 @@ void
 FGFX::update ()
 {
   FGSoundMgr * mgr = globals->get_soundmgr();
-
+  int i;
 
   ////////////////////////////////////////////////////////////////////
   // Update the engine sound.
   ////////////////////////////////////////////////////////////////////
   
-  for (int i = 0; i < MAX_ENGINES; i++) {
+  for (i = 0; i < MAX_ENGINES; i++) {
 
     if (cur_fdm_state->get_num_engines() > 0 &&
        _engine_running_prop[i]->getBoolValue()) {
@@ -311,7 +312,7 @@ FGFX::update ()
 
                                // FIXME: take rotational velocities
                                // into account as well.
-  for (int i = 0; i < totalGear; i++) {
+  for (i = 0; i < totalGear; i++) {
     if (cur_fdm_state->get_gear_unit(i)->GetWoW()) {
       gearOnGround++;
       if (!_gear_on_ground[i]) {