From cff6b2034de866df70a2b29feb3383ee8ccbbef6 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 29 Jul 2013 22:59:45 +0100 Subject: [PATCH] Remove unnecessary includes/using flight.hxx (FGInterface) was pulling in list, string and vector, and 'using' them, despite no actual need. --- src/FDM/ExternalNet/ExternalNet.hxx | 4 ++-- src/FDM/ExternalPipe/ExternalPipe.hxx | 12 ++++++------ src/FDM/flight.cxx | 2 +- src/FDM/flight.hxx | 8 -------- src/Main/fg_commands.cxx | 2 +- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/FDM/ExternalNet/ExternalNet.hxx b/src/FDM/ExternalNet/ExternalNet.hxx index a3f80891a..899650b41 100644 --- a/src/FDM/ExternalNet/ExternalNet.hxx +++ b/src/FDM/ExternalNet/ExternalNet.hxx @@ -38,7 +38,7 @@ private: int data_in_port; int data_out_port; int cmd_port; - string fdm_host; + std::string fdm_host; simgear::Socket data_client; simgear::Socket data_server; @@ -51,7 +51,7 @@ private: public: // Constructor - FGExternalNet( double dt, string host, int dop, int dip, int cp ); + FGExternalNet( double dt, std::string host, int dop, int dip, int cp ); // Destructor ~FGExternalNet(); diff --git a/src/FDM/ExternalPipe/ExternalPipe.hxx b/src/FDM/ExternalPipe/ExternalPipe.hxx index 866967c12..1881bffba 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.hxx +++ b/src/FDM/ExternalPipe/ExternalPipe.hxx @@ -38,11 +38,11 @@ private: bool valid; - string fifo_name_1; - string fifo_name_2; + std::string fifo_name_1; + std::string fifo_name_2; FILE *pd1; FILE *pd2; - string _protocol; + std::string _protocol; FGNetCtrls ctrls; FGNetFDM fdm; @@ -51,8 +51,8 @@ private: double last_weight; double last_cg_offset; - vector property_names; - vector nodes; + std::vector property_names; + std::vector nodes; // Protocol specific init routines void init_binary(); @@ -66,7 +66,7 @@ private: public: // Constructor - FGExternalPipe( double dt, string fifo_name, string protocol ); + FGExternalPipe( double dt, std::string fifo_name, std::string protocol ); // Destructor ~FGExternalPipe(); diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index ccef14e0b..8a06e361f 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -200,7 +200,7 @@ FGInterface::common_init () if ( !fgHasNode("/sim/presets/speed-set") ) { set_V_calibrated_kts(0.0); } else { - const string speedset = fgGetString("/sim/presets/speed-set"); + const std::string speedset = fgGetString("/sim/presets/speed-set"); if ( speedset == "knots" || speedset == "KNOTS" ) { set_V_calibrated_kts( fgGetDouble("/sim/presets/airspeed-kt") ); } else if ( speedset == "mach" || speedset == "MACH" ) { diff --git a/src/FDM/flight.hxx b/src/FDM/flight.hxx index 0c3a81ce2..c6f3024d0 100644 --- a/src/FDM/flight.hxx +++ b/src/FDM/flight.hxx @@ -75,20 +75,12 @@ #include -#include -#include -#include - #include #include #include #include #include -using std::list; -using std::vector; -using std::string; - namespace simgear { class BVHMaterial; } diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 5a22bcdeb..2a93954c6 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -843,7 +843,7 @@ static bool do_property_cycle (const SGPropertyNode * arg) { SGPropertyNode * prop = get_prop(arg); - vector values = arg->getChildren("value"); + std::vector values = arg->getChildren("value"); bool wrap = arg->getBoolValue("wrap", true); // compatible with knob/pick animations