From: curt Date: Sun, 9 Dec 2001 05:20:13 +0000 (+0000) Subject: MSVC patches from Christian Mayer. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=810aee6de8305a82a032132bd94161b5829d1eca;p=flightgear.git MSVC patches from Christian Mayer. --- diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index 6bcf7f0bd..5218ab7ac 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -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, "") }; diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index 370d23c03..96d8d9a96 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -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]) {