From: curt Date: Mon, 19 Apr 2004 02:24:22 +0000 (+0000) Subject: Fix an MSVC compile error. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bded088de1a4ab4664cfe9d82c59946870857d3d;p=flightgear.git Fix an MSVC compile error. --- diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 6eb034f31..6e1197735 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1001,26 +1001,25 @@ static bool fgSetPosFromFix( const string& id ) { } } -static bool parseWaypoints() - { +static void parseWaypoints() { string_list *waypoints = globals->get_initial_waypoints(); - if (waypoints) - { + if (waypoints) { vector::iterator i; for (i = waypoints->begin(); i != waypoints->end(); i++) - { - NewWaypoint(*i); - } + { + NewWaypoint(*i); + } // Now were done using the way points we can deallocate the // memory they used - while (waypoints->begin() != waypoints->end()) - waypoints->pop_back(); + while (waypoints->begin() != waypoints->end()) { + waypoints->pop_back(); + } delete waypoints; globals->set_initial_waypoints(0); - } - } + } +} diff --git a/src/Main/options.cxx b/src/Main/options.cxx index c719def4f..0e19d6ee3 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -539,13 +539,14 @@ add_channel( const string& type, const string& channel_str ) { // at this stage. // Parse --wp=ID[@alt] -static bool +static void parse_wp( const string& arg ) { - string_list *waypoints = globals->get_initial_waypoints(); - if (!waypoints) - waypoints = new string_list; - waypoints->push_back(arg); - globals->set_initial_waypoints(waypoints); + string_list *waypoints = globals->get_initial_waypoints(); + if (!waypoints) { + waypoints = new string_list; + } + waypoints->push_back(arg); + globals->set_initial_waypoints(waypoints); }