From bded088de1a4ab4664cfe9d82c59946870857d3d Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 19 Apr 2004 02:24:22 +0000 Subject: [PATCH] Fix an MSVC compile error. --- src/Main/fg_init.cxx | 21 ++++++++++----------- src/Main/options.cxx | 13 +++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) 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); } -- 2.39.5