diff --git a/src/AIModel/AICarrier.hxx b/src/AIModel/AICarrier.hxx index b71779de0..4911d3151 100644 --- a/src/AIModel/AICarrier.hxx +++ b/src/AIModel/AICarrier.hxx @@ -18,8 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef _FG_AICARRIER_HXX -#define _FG_AICARRIER_HXX +#pragma once #include #include @@ -27,9 +26,6 @@ #include #include -using std::list; -using std::string; - #include "AIShip.hxx" #include "AIBase.hxx" @@ -46,9 +42,9 @@ public: void readFromScenario(SGPropertyNode* scFileNode) override; - void setSign(const string&); + void setSign(const std::string&); void setDeckAltitudeFt(const double altitude_feet); - void setTACANChannelID(const string&); + void setTACANChannelID(const std::string&); double getDefaultModelRadius() override { return 350.0; } void bind() override; @@ -71,7 +67,7 @@ public: const char* getTypeString(void) const override { return "carrier"; } - bool getParkPosition(const string& id, SGGeod& geodPos, double& hdng, SGVec3d& uvw); + bool getParkPosition(const std::string& id, SGGeod& geodPos, double& hdng, SGVec3d& uvw); /** * @brief type-safe wrapper around AIManager::getObjectFromProperty @@ -102,11 +98,11 @@ private: : name(pp.name), offset(pp.offset), heading_deg(pp.heading_deg) { } - ParkPosition(const string& n, const SGVec3d& off = SGVec3d(), double heading = 0) + ParkPosition(const std::string& n, const SGVec3d& off = SGVec3d(), double heading = 0) : name(n), offset(off), heading_deg(heading) { } - string name; + std::string name; SGVec3d offset; double heading_deg; }; @@ -157,16 +153,16 @@ private: SGGeod _mOpBoxPos; // operational box limit for carrier. bool _MPControl = false; // being controlled by MP. Either this or AIControl will be true SGPropertyNode_ptr _pitch_node; - list _ppositions; // List of positions where an aircraft can start. + std::list _ppositions; // List of positions where an aircraft can start. double _rel_wind = 0; double _rel_wind_from_deg = 0; double _rel_wind_speed_kts = 0; bool _returning = false; // set if the carrier is returning to an operating box SGPropertyNode_ptr _roll_node; - string _sign; // The sign (pennant) of this carrier; e.g. CVN-68 + std::string _sign; // The sign (pennant) of this carrier; e.g. CVN-68 SGPropertyNode_ptr _surface_wind_from_deg_node; SGPropertyNode_ptr _surface_wind_speed_node; - string _TACAN_channel_id; + std::string _TACAN_channel_id; SGVec3d _towerPosition; bool _turn_to_base_course = true; bool _turn_to_launch_hdg = true; @@ -181,8 +177,4 @@ private: double _wind_from_north = 0; // fps double _wind_speed_kts = 0; //true wind speed SGPropertyNode_ptr _is_user_craft; - - }; - -#endif // _FG_AICARRIER_HXX diff --git a/src/AIModel/AIStatic.hxx b/src/AIModel/AIStatic.hxx index 83141e9ee..b35e58879 100644 --- a/src/AIModel/AIStatic.hxx +++ b/src/AIModel/AIStatic.hxx @@ -18,14 +18,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef _FG_AIStatic_HXX -#define _FG_AIStatic_HXX +#pragma once #include "AIManager.hxx" #include "AIBase.hxx" #include -using std::string; class FGAIStatic : public FGAIBase { @@ -39,5 +37,3 @@ public: const char* getTypeString(void) const override { return "static"; } }; - -#endif // _FG_AISTATIC_HXX diff --git a/src/AIModel/AIStorm.hxx b/src/AIModel/AIStorm.hxx index 90eff9cf4..731df0c0d 100644 --- a/src/AIModel/AIStorm.hxx +++ b/src/AIModel/AIStorm.hxx @@ -18,14 +18,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef _FG_AIStorm_HXX -#define _FG_AIStorm_HXX +#pragma once #include "AIManager.hxx" #include "AIBase.hxx" #include -using std::string; class FGAIStorm : public FGAIBase { @@ -69,5 +67,3 @@ private: SGPropertyNode_ptr turb_rate_node; }; - -#endif // _FG_AIStorm_HXX diff --git a/src/AIModel/AIThermal.hxx b/src/AIModel/AIThermal.hxx index 58057debe..a5a398306 100644 --- a/src/AIModel/AIThermal.hxx +++ b/src/AIModel/AIThermal.hxx @@ -20,14 +20,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef _FG_AIThermal_HXX -#define _FG_AIThermal_HXX +#pragma once #include "AIManager.hxx" #include "AIBase.hxx" #include -using std::string; class FGAIThermal : public FGAIBase { @@ -89,5 +87,3 @@ private: SGPropertyNode_ptr _aloft_wind_speed_node; }; - -#endif // _FG_AIThermal_HXX diff --git a/src/Airports/runwayprefloader.hxx b/src/Airports/runwayprefloader.hxx index f86fd327e..093eb864a 100644 --- a/src/Airports/runwayprefloader.hxx +++ b/src/Airports/runwayprefloader.hxx @@ -13,8 +13,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#ifndef _RUNWAY_PREF_LOADER_HXX_ -#define _RUNWAY_PREF_LOADER_HXX_ +#pragma once #include #include @@ -24,7 +23,6 @@ #include "runwayprefs.hxx" -using std::string; class FGRunwayPreferenceXMLLoader : public XMLVisitor { public: @@ -40,18 +38,16 @@ protected: virtual void warning (const char * message, int line, int column); virtual void error (const char * message, int line, int column); - time_t processTime(const string &tme); + time_t processTime(const std::string &tme); private: FGRunwayPreference* _pref; - string value; + std::string value; - string scheduleName; + std::string scheduleName; ScheduleTime currTimes; // Needed for parsing; RunwayList rwyList; RunwayGroup rwyGroup; }; - -#endif diff --git a/src/Cockpit/render_area_2d.hxx b/src/Cockpit/render_area_2d.hxx index 83d74efef..5e36ae81e 100644 --- a/src/Cockpit/render_area_2d.hxx +++ b/src/Cockpit/render_area_2d.hxx @@ -21,12 +21,7 @@ // // $Id$ -#ifndef _RENDER_AREA_2D -#define _RENDER_AREA_2D - -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include #include @@ -37,7 +32,6 @@ #include -using std::vector; enum RA2DDrawingType { RA2D_LINE, @@ -107,10 +101,8 @@ private: void RenderQuad( const SGVec2f *p); void RenderQuad( const SGVec2f *p, const SGVec4f *color ); - vector drawing_list; + std::vector drawing_list; // Control whether to output debugging output bool _ra2d_debug; }; - -#endif diff --git a/src/Environment/fgmetar.hxx b/src/Environment/fgmetar.hxx index f54288b5f..8db7f1d2b 100644 --- a/src/Environment/fgmetar.hxx +++ b/src/Environment/fgmetar.hxx @@ -20,8 +20,7 @@ // // $Id$ -#ifndef _FGMETAR_HXX -#define _FGMETAR_HXX +#pragma once #include #include @@ -30,14 +29,10 @@ #include -using std::vector; -using std::map; -using std::string; - class FGMetar : public SGMetar, public SGReferenced { public: - FGMetar(const string& icao); + FGMetar(const std::string& icao); long getAge_min() const; time_t getTime() const { return _time; } @@ -51,5 +46,3 @@ private: time_t _time; bool _snow_cover; }; - -#endif // _FGMETAR_HXX diff --git a/src/Environment/ridge_lift.hxx b/src/Environment/ridge_lift.hxx index 8f82a51e7..61557eb25 100644 --- a/src/Environment/ridge_lift.hxx +++ b/src/Environment/ridge_lift.hxx @@ -25,16 +25,9 @@ // -#ifndef _FG_RidgeLift_HXX -#define _FG_RidgeLift_HXX - -#ifdef HAVE_CONFIG -# include -#endif - +#pragma once #include -using std::string; #include @@ -87,5 +80,3 @@ private: simgear::TiedPropertyList _tiedProperties; }; - -#endif // _FG_RidgeLift_HXX diff --git a/src/FDM/UIUCModel/uiuc_1DdataFileReader.cpp b/src/FDM/UIUCModel/uiuc_1DdataFileReader.cpp index 7b91c9a2e..741ecece1 100644 --- a/src/FDM/UIUCModel/uiuc_1DdataFileReader.cpp +++ b/src/FDM/UIUCModel/uiuc_1DdataFileReader.cpp @@ -74,6 +74,9 @@ #include "uiuc_1DdataFileReader.h" +using std::string; +using std::istringstream; + int uiuc_1DdataFileReader( string file_name, double x[], double y[], int &xmax ) diff --git a/src/FDM/UIUCModel/uiuc_1DdataFileReader.h b/src/FDM/UIUCModel/uiuc_1DdataFileReader.h index 90ec18a4e..6e689d334 100644 --- a/src/FDM/UIUCModel/uiuc_1DdataFileReader.h +++ b/src/FDM/UIUCModel/uiuc_1DdataFileReader.h @@ -1,5 +1,4 @@ -#ifndef _1D_DATA_FILE_READER_H_ -#define _1D_DATA_FILE_READER_H_ +#pragma once #include @@ -10,15 +9,12 @@ #include "uiuc_aircraft.h" #include "uiuc_warnings_errors.h" -//using std::istrstream; -int uiuc_1DdataFileReader( string file_name, +int uiuc_1DdataFileReader( std::string file_name, double x[], double y[], int &xmax ); -int uiuc_1DdataFileReader( string file_name, +int uiuc_1DdataFileReader( std::string file_name, double x[], int y[], int &xmax ); - -#endif // _1D_DATA_FILE_READER_H_ diff --git a/src/FDM/UIUCModel/uiuc_2DdataFileReader.cpp b/src/FDM/UIUCModel/uiuc_2DdataFileReader.cpp index 58eae4e54..d93feaf64 100644 --- a/src/FDM/UIUCModel/uiuc_2DdataFileReader.cpp +++ b/src/FDM/UIUCModel/uiuc_2DdataFileReader.cpp @@ -77,6 +77,8 @@ #include "uiuc_2DdataFileReader.h" +using std::string; +using std::istringstream; void uiuc_2DdataFileReader( string file_name, double x[100][100], diff --git a/src/FDM/UIUCModel/uiuc_2DdataFileReader.h b/src/FDM/UIUCModel/uiuc_2DdataFileReader.h index 428abc10d..0484bff7a 100644 --- a/src/FDM/UIUCModel/uiuc_2DdataFileReader.h +++ b/src/FDM/UIUCModel/uiuc_2DdataFileReader.h @@ -1,5 +1,4 @@ -#ifndef _2D_DATA_FILE_READER_H_ -#define _2D_DATA_FILE_READER_H_ +#pragma once #include @@ -9,13 +8,10 @@ #include "uiuc_parsefile.h" #include "uiuc_aircraft.h" -//using std::istrstream; -void uiuc_2DdataFileReader( string file_name, +void uiuc_2DdataFileReader( std::string file_name, double x[100][100], double y[100], double z[100][100], int xmax[100], int &ymax); - -#endif // _2D_DATA_FILE_READER_H_ diff --git a/src/FDM/UIUCModel/uiuc_aircraft.h b/src/FDM/UIUCModel/uiuc_aircraft.h index a38d84cf4..cf3a4191f 100644 --- a/src/FDM/UIUCModel/uiuc_aircraft.h +++ b/src/FDM/UIUCModel/uiuc_aircraft.h @@ -136,8 +136,7 @@ **********************************************************************/ -#ifndef _AIRCRAFT_H_ -#define _AIRCRAFT_H_ +#pragma once #include @@ -630,7 +629,7 @@ struct AIRCRAFT #define recordParts aircraft_->recordParts /*= Keywords (token1) ===========================================*/ - std::map Keyword_map; + std::map Keyword_map; #define Keyword_map aircraft_->Keyword_map double CD, CX, CL, CZ, Cm, CY, Cl, Cn; @@ -665,7 +664,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* init ========== Initial values for equations of motion =======*/ - std::map init_map; + std::map init_map; #define init_map aircraft_->init_map int recordRate; @@ -759,7 +758,7 @@ struct AIRCRAFT bool trim_case_2; #define trim_case_2 aircraft_->trim_case_2 bool use_uiuc_network; - string server_IP; + std::string server_IP; int port_num; #define use_uiuc_network aircraft_->use_uiuc_network #define server_IP aircraft_->server_IP @@ -772,7 +771,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* geometry ====== Aircraft-specific geometric quantities =======*/ - std::map geometry_map; + std::map geometry_map; #define geometry_map aircraft_->geometry_map double bw, cbar, Sw, ih, bh, chord_h, Sh; @@ -788,7 +787,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* controlSurface Control surface deflections and properties ===*/ - std::map controlSurface_map; + std::map controlSurface_map; #define controlSurface_map aircraft_->controlSurface_map double demax, demin; @@ -837,7 +836,7 @@ struct AIRCRAFT #define elevator_doublet_duration aircraft_->elevator_doublet_duration bool elevator_input; - string elevator_input_file; + std::string elevator_input_file; double elevator_input_timeArray[7500]; double elevator_input_deArray[7500]; int elevator_input_ntime; @@ -850,7 +849,7 @@ struct AIRCRAFT #define elevator_input_startTime aircraft_->elevator_input_startTime bool aileron_input; - string aileron_input_file; + std::string aileron_input_file; double aileron_input_timeArray[1500]; double aileron_input_daArray[1500]; int aileron_input_ntime; @@ -863,7 +862,7 @@ struct AIRCRAFT #define aileron_input_startTime aircraft_->aileron_input_startTime bool rudder_input; - string rudder_input_file; + std::string rudder_input_file; double rudder_input_timeArray[500]; double rudder_input_drArray[500]; int rudder_input_ntime; @@ -904,7 +903,7 @@ struct AIRCRAFT bool flap_pos_input; - string flap_pos_input_file; + std::string flap_pos_input_file; double flap_pos_input_timeArray[500]; double flap_pos_input_dfArray[500]; int flap_pos_input_ntime; @@ -975,7 +974,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* controlsMixer = Control mixer ================================*/ - std::map controlsMixer_map; + std::map controlsMixer_map; #define controlsMixer_map aircraft_->controlsMixer_map double nomix; @@ -985,7 +984,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* mass =========== Aircraft-specific mass properties ===========*/ - std::map mass_map; + std::map mass_map; #define mass_map aircraft_->mass_map double Weight; @@ -1011,7 +1010,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* engine ======== Propulsion data ==============================*/ - std::map engine_map; + std::map engine_map; #define engine_map aircraft_->engine_map double simpleSingleMaxThrust; @@ -1034,7 +1033,7 @@ struct AIRCRAFT #define eta_q aircraft_->eta_q bool Throttle_pct_input; - string Throttle_pct_input_file; + std::string Throttle_pct_input_file; double Throttle_pct_input_timeArray[1500]; double Throttle_pct_input_dTArray[1500]; int Throttle_pct_input_ntime; @@ -1113,7 +1112,7 @@ struct AIRCRAFT bool Xp_input; - string Xp_input_file; + std::string Xp_input_file; double Xp_input_timeArray[5400]; double Xp_input_XpArray[5400]; int Xp_input_ntime; @@ -1125,7 +1124,7 @@ struct AIRCRAFT #define Xp_input_ntime aircraft_->Xp_input_ntime #define Xp_input_startTime aircraft_->Xp_input_startTime bool Zp_input; - string Zp_input_file; + std::string Zp_input_file; double Zp_input_timeArray[5400]; double Zp_input_ZpArray[5400]; int Zp_input_ntime; @@ -1137,7 +1136,7 @@ struct AIRCRAFT #define Zp_input_ntime aircraft_->Zp_input_ntime #define Zp_input_startTime aircraft_->Zp_input_startTime bool Mp_input; - string Mp_input_file; + std::string Mp_input_file; double Mp_input_timeArray[5400]; double Mp_input_MpArray[5400]; int Mp_input_ntime; @@ -1153,7 +1152,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* CD ============ Aerodynamic x-force quantities (longitudinal) */ - std::map CD_map; + std::map CD_map; #define CD_map aircraft_->CD_map double CDo, CDK, CLK, CD_a, CD_adot, CD_q, CD_ih, CD_de, CD_dr, CD_da, CD_beta; @@ -1174,7 +1173,7 @@ struct AIRCRAFT #define CD_dg aircraft_->CD_dg bool b_CLK; #define b_CLK aircraft_->b_CLK - string CDfa; + std::string CDfa; double CDfa_aArray[100]; double CDfa_CDArray[100]; int CDfa_nAlpha; @@ -1184,7 +1183,7 @@ struct AIRCRAFT #define CDfa_CDArray aircraft_->CDfa_CDArray #define CDfa_nAlpha aircraft_->CDfa_nAlpha #define CDfaI aircraft_->CDfaI - string CDfCL; + std::string CDfCL; double CDfCL_CLArray[100]; double CDfCL_CDArray[100]; int CDfCL_nCL; @@ -1194,7 +1193,7 @@ struct AIRCRAFT #define CDfCL_CDArray aircraft_->CDfCL_CDArray #define CDfCL_nCL aircraft_->CDfCL_nCL #define CDfCLI aircraft_->CDfCLI - string CDfade; + std::string CDfade; double CDfade_aArray[100][100]; double CDfade_deArray[100]; double CDfade_CDArray[100][100]; @@ -1208,7 +1207,7 @@ struct AIRCRAFT #define CDfade_nAlphaArray aircraft_->CDfade_nAlphaArray #define CDfade_nde aircraft_->CDfade_nde #define CDfadeI aircraft_->CDfadeI - string CDfdf; + std::string CDfdf; double CDfdf_dfArray[100]; double CDfdf_CDArray[100]; int CDfdf_ndf; @@ -1218,7 +1217,7 @@ struct AIRCRAFT #define CDfdf_CDArray aircraft_->CDfdf_CDArray #define CDfdf_ndf aircraft_->CDfdf_ndf #define CDfdfI aircraft_->CDfdfI - string CDfadf; + std::string CDfadf; double CDfadf_aArray[100][100]; double CDfadf_dfArray[100]; double CDfadf_CDArray[100][100]; @@ -1353,7 +1352,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* CL ============ Aerodynamic z-force quantities (longitudinal) */ - std::map CL_map; + std::map CL_map; #define CL_map aircraft_->CL_map double CLo, CL_a, CL_adot, CL_q, CL_ih, CL_de; @@ -1367,7 +1366,7 @@ struct AIRCRAFT #define CL_df aircraft_->CL_df #define CL_ds aircraft_->CL_ds #define CL_dg aircraft_->CL_dg - string CLfa; + std::string CLfa; double CLfa_aArray[100]; double CLfa_CLArray[100]; int CLfa_nAlpha; @@ -1377,7 +1376,7 @@ struct AIRCRAFT #define CLfa_CLArray aircraft_->CLfa_CLArray #define CLfa_nAlpha aircraft_->CLfa_nAlpha #define CLfaI aircraft_->CLfaI - string CLfade; + std::string CLfade; double CLfade_aArray[100][100]; double CLfade_deArray[100]; double CLfade_CLArray[100][100]; @@ -1391,7 +1390,7 @@ struct AIRCRAFT #define CLfade_nAlphaArray aircraft_->CLfade_nAlphaArray #define CLfade_nde aircraft_->CLfade_nde #define CLfadeI aircraft_->CLfadeI - string CLfdf; + std::string CLfdf; double CLfdf_dfArray[100]; double CLfdf_CLArray[100]; int CLfdf_ndf; @@ -1401,7 +1400,7 @@ struct AIRCRAFT #define CLfdf_CLArray aircraft_->CLfdf_CLArray #define CLfdf_ndf aircraft_->CLfdf_ndf #define CLfdfI aircraft_->CLfdfI - string CLfadf; + std::string CLfadf; double CLfadf_aArray[100][100]; double CLfadf_dfArray[100]; double CLfadf_CLArray[100][100]; @@ -1427,7 +1426,7 @@ struct AIRCRAFT #define CZ_deb2 aircraft_->CZ_deb2 #define CZ_df aircraft_->CZ_df #define CZ_adf aircraft_->CZ_adf - string CZfa; + std::string CZfa; double CZfa_aArray[100]; double CZfa_CZArray[100]; int CZfa_nAlpha; @@ -1540,7 +1539,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* Cm ============ Aerodynamic m-moment quantities (longitudinal) */ - std::map Cm_map; + std::map Cm_map; #define Cm_map aircraft_->Cm_map double Cmo, Cm_a, Cm_a2, Cm_adot, Cm_q; @@ -1558,7 +1557,7 @@ struct AIRCRAFT #define Cm_df aircraft_->Cm_df #define Cm_ds aircraft_->Cm_ds #define Cm_dg aircraft_->Cm_dg - string Cmfa; + std::string Cmfa; double Cmfa_aArray[100]; double Cmfa_CmArray[100]; int Cmfa_nAlpha; @@ -1568,7 +1567,7 @@ struct AIRCRAFT #define Cmfa_CmArray aircraft_->Cmfa_CmArray #define Cmfa_nAlpha aircraft_->Cmfa_nAlpha #define CmfaI aircraft_->CmfaI - string Cmfade; + std::string Cmfade; double Cmfade_aArray[100][100]; double Cmfade_deArray[100]; double Cmfade_CmArray[100][100]; @@ -1588,7 +1587,7 @@ struct AIRCRAFT #define w_induced aircraft_->w_induced - string Cmfdf; + std::string Cmfdf; double Cmfdf_dfArray[100]; double Cmfdf_CmArray[100]; int Cmfdf_ndf; @@ -1598,7 +1597,7 @@ struct AIRCRAFT #define Cmfdf_CmArray aircraft_->Cmfdf_CmArray #define Cmfdf_ndf aircraft_->Cmfdf_ndf #define CmfdfI aircraft_->CmfdfI - string Cmfadf; + std::string Cmfadf; double Cmfadf_aArray[100][100]; double Cmfadf_dfArray[100]; double Cmfadf_CmArray[100][100]; @@ -1704,7 +1703,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* CY ============ Aerodynamic y-force quantities (lateral) =====*/ - std::map CY_map; + std::map CY_map; #define CY_map aircraft_->CY_map double CYo, CY_beta, CY_p, CY_r, CY_da, CY_dr, CY_dra, CY_bdot; @@ -1716,7 +1715,7 @@ struct AIRCRAFT #define CY_dr aircraft_->CY_dr #define CY_dra aircraft_->CY_dra #define CY_bdot aircraft_->CY_bdot - string CYfada; + std::string CYfada; double CYfada_aArray[100][100]; double CYfada_daArray[100]; double CYfada_CYArray[100][100]; @@ -1730,7 +1729,7 @@ struct AIRCRAFT #define CYfada_nAlphaArray aircraft_->CYfada_nAlphaArray #define CYfada_nda aircraft_->CYfada_nda #define CYfadaI aircraft_->CYfadaI - string CYfbetadr; + std::string CYfbetadr; double CYfbetadr_betaArray[100][100]; double CYfbetadr_drArray[100]; double CYfbetadr_CYArray[100][100]; @@ -1879,7 +1878,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* Cl ============ Aerodynamic l-moment quantities (lateral) ====*/ - std::map Cl_map; + std::map Cl_map; #define Cl_map aircraft_->Cl_map double Clo, Cl_beta, Cl_p, Cl_r, Cl_da, Cl_dr, Cl_daa; @@ -1890,7 +1889,7 @@ struct AIRCRAFT #define Cl_da aircraft_->Cl_da #define Cl_dr aircraft_->Cl_dr #define Cl_daa aircraft_->Cl_daa - string Clfada; + std::string Clfada; double Clfada_aArray[100][100]; double Clfada_daArray[100]; double Clfada_ClArray[100][100]; @@ -1904,7 +1903,7 @@ struct AIRCRAFT #define Clfada_nAlphaArray aircraft_->Clfada_nAlphaArray #define Clfada_nda aircraft_->Clfada_nda #define ClfadaI aircraft_->ClfadaI - string Clfbetadr; + std::string Clfbetadr; double Clfbetadr_betaArray[100][100]; double Clfbetadr_drArray[100]; double Clfbetadr_ClArray[100][100]; @@ -2052,7 +2051,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* Cn ============ Aerodynamic n-moment quantities (lateral) ====*/ - std::map Cn_map; + std::map Cn_map; #define Cn_map aircraft_->Cn_map double Cno, Cn_beta, Cn_p, Cn_r, Cn_da, Cn_dr, Cn_q, Cn_b3; @@ -2064,7 +2063,7 @@ struct AIRCRAFT #define Cn_dr aircraft_->Cn_dr #define Cn_q aircraft_->Cn_q #define Cn_b3 aircraft_->Cn_b3 - string Cnfada; + std::string Cnfada; double Cnfada_aArray[100][100]; double Cnfada_daArray[100]; double Cnfada_CnArray[100][100]; @@ -2078,7 +2077,7 @@ struct AIRCRAFT #define Cnfada_nAlphaArray aircraft_->Cnfada_nAlphaArray #define Cnfada_nda aircraft_->Cnfada_nda #define CnfadaI aircraft_->CnfadaI - string Cnfbetadr; + std::string Cnfbetadr; double Cnfbetadr_betaArray[100][100]; double Cnfbetadr_drArray[100]; double Cnfbetadr_CnArray[100][100]; @@ -2227,7 +2226,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* gear ========== Landing gear model quantities ================*/ - std::map gear_map; + std::map gear_map; #define gear_map aircraft_->gear_map #define MAX_GEAR 16 @@ -2253,7 +2252,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* ice =========== Ice model quantities ======================== */ - std::map ice_map; + std::map ice_map; #define ice_map aircraft_->ice_map bool ice_model, ice_on, beta_model; @@ -2432,7 +2431,7 @@ struct AIRCRAFT bool eta_from_file; #define eta_from_file aircraft_->eta_from_file bool eta_wing_left_input; - string eta_wing_left_input_file; + std::string eta_wing_left_input_file; double eta_wing_left_input_timeArray[100]; double eta_wing_left_input_daArray[100]; int eta_wing_left_input_ntime; @@ -2444,7 +2443,7 @@ struct AIRCRAFT #define eta_wing_left_input_ntime aircraft_->eta_wing_left_input_ntime #define eta_wing_left_input_startTime aircraft_->eta_wing_left_input_startTime bool eta_wing_right_input; - string eta_wing_right_input_file; + std::string eta_wing_right_input_file; double eta_wing_right_input_timeArray[100]; double eta_wing_right_input_daArray[100]; int eta_wing_right_input_ntime; @@ -2456,7 +2455,7 @@ struct AIRCRAFT #define eta_wing_right_input_ntime aircraft_->eta_wing_right_input_ntime #define eta_wing_right_input_startTime aircraft_->eta_wing_right_input_startTime bool eta_tail_input; - string eta_tail_input_file; + std::string eta_tail_input_file; double eta_tail_input_timeArray[100]; double eta_tail_input_daArray[100]; int eta_tail_input_ntime; @@ -2468,7 +2467,7 @@ struct AIRCRAFT #define eta_tail_input_ntime aircraft_->eta_tail_input_ntime #define eta_tail_input_startTime aircraft_->eta_tail_input_startTime bool demo_eps_alpha_max; - string demo_eps_alpha_max_file; + std::string demo_eps_alpha_max_file; double demo_eps_alpha_max_timeArray[100]; double demo_eps_alpha_max_daArray[100]; int demo_eps_alpha_max_ntime; @@ -2480,7 +2479,7 @@ struct AIRCRAFT #define demo_eps_alpha_max_ntime aircraft_->demo_eps_alpha_max_ntime #define demo_eps_alpha_max_startTime aircraft_->demo_eps_alpha_max_startTime bool demo_eps_pitch_max; - string demo_eps_pitch_max_file; + std::string demo_eps_pitch_max_file; double demo_eps_pitch_max_timeArray[100]; double demo_eps_pitch_max_daArray[100]; int demo_eps_pitch_max_ntime; @@ -2492,7 +2491,7 @@ struct AIRCRAFT #define demo_eps_pitch_max_ntime aircraft_->demo_eps_pitch_max_ntime #define demo_eps_pitch_max_startTime aircraft_->demo_eps_pitch_max_startTime bool demo_eps_pitch_min; - string demo_eps_pitch_min_file; + std::string demo_eps_pitch_min_file; double demo_eps_pitch_min_timeArray[100]; double demo_eps_pitch_min_daArray[100]; int demo_eps_pitch_min_ntime; @@ -2504,7 +2503,7 @@ struct AIRCRAFT #define demo_eps_pitch_min_ntime aircraft_->demo_eps_pitch_min_ntime #define demo_eps_pitch_min_startTime aircraft_->demo_eps_pitch_min_startTime bool demo_eps_roll_max; - string demo_eps_roll_max_file; + std::string demo_eps_roll_max_file; double demo_eps_roll_max_timeArray[10]; double demo_eps_roll_max_daArray[10]; int demo_eps_roll_max_ntime; @@ -2516,7 +2515,7 @@ struct AIRCRAFT #define demo_eps_roll_max_ntime aircraft_->demo_eps_roll_max_ntime #define demo_eps_roll_max_startTime aircraft_->demo_eps_roll_max_startTime bool demo_eps_thrust_min; - string demo_eps_thrust_min_file; + std::string demo_eps_thrust_min_file; double demo_eps_thrust_min_timeArray[100]; double demo_eps_thrust_min_daArray[100]; int demo_eps_thrust_min_ntime; @@ -2528,7 +2527,7 @@ struct AIRCRAFT #define demo_eps_thrust_min_ntime aircraft_->demo_eps_thrust_min_ntime #define demo_eps_thrust_min_startTime aircraft_->demo_eps_thrust_min_startTime bool demo_eps_airspeed_max; - string demo_eps_airspeed_max_file; + std::string demo_eps_airspeed_max_file; double demo_eps_airspeed_max_timeArray[10]; double demo_eps_airspeed_max_daArray[10]; int demo_eps_airspeed_max_ntime; @@ -2540,7 +2539,7 @@ struct AIRCRAFT #define demo_eps_airspeed_max_ntime aircraft_->demo_eps_airspeed_max_ntime #define demo_eps_airspeed_max_startTime aircraft_->demo_eps_airspeed_max_startTime bool demo_eps_airspeed_min; - string demo_eps_airspeed_min_file; + std::string demo_eps_airspeed_min_file; double demo_eps_airspeed_min_timeArray[100]; double demo_eps_airspeed_min_daArray[100]; int demo_eps_airspeed_min_ntime; @@ -2552,7 +2551,7 @@ struct AIRCRAFT #define demo_eps_airspeed_min_ntime aircraft_->demo_eps_airspeed_min_ntime #define demo_eps_airspeed_min_startTime aircraft_->demo_eps_airspeed_min_startTime bool demo_eps_flap_max; - string demo_eps_flap_max_file; + std::string demo_eps_flap_max_file; double demo_eps_flap_max_timeArray[10]; double demo_eps_flap_max_daArray[10]; int demo_eps_flap_max_ntime; @@ -2564,7 +2563,7 @@ struct AIRCRAFT #define demo_eps_flap_max_ntime aircraft_->demo_eps_flap_max_ntime #define demo_eps_flap_max_startTime aircraft_->demo_eps_flap_max_startTime bool demo_boot_cycle_tail; - string demo_boot_cycle_tail_file; + std::string demo_boot_cycle_tail_file; double demo_boot_cycle_tail_timeArray[100]; int demo_boot_cycle_tail_daArray[100]; int demo_boot_cycle_tail_ntime; @@ -2576,7 +2575,7 @@ struct AIRCRAFT #define demo_boot_cycle_tail_ntime aircraft_->demo_boot_cycle_tail_ntime #define demo_boot_cycle_tail_startTime aircraft_->demo_boot_cycle_tail_startTime bool demo_boot_cycle_wing_left; - string demo_boot_cycle_wing_left_file; + std::string demo_boot_cycle_wing_left_file; double demo_boot_cycle_wing_left_timeArray[100]; int demo_boot_cycle_wing_left_daArray[100]; int demo_boot_cycle_wing_left_ntime; @@ -2588,7 +2587,7 @@ struct AIRCRAFT #define demo_boot_cycle_wing_left_ntime aircraft_->demo_boot_cycle_wing_left_ntime #define demo_boot_cycle_wing_left_startTime aircraft_->demo_boot_cycle_wing_left_startTime bool demo_boot_cycle_wing_right; - string demo_boot_cycle_wing_right_file; + std::string demo_boot_cycle_wing_right_file; double demo_boot_cycle_wing_right_timeArray[100]; int demo_boot_cycle_wing_right_daArray[100]; int demo_boot_cycle_wing_right_ntime; @@ -2600,7 +2599,7 @@ struct AIRCRAFT #define demo_boot_cycle_wing_right_ntime aircraft_->demo_boot_cycle_wing_right_ntime #define demo_boot_cycle_wing_right_startTime aircraft_->demo_boot_cycle_wing_right_startTime bool demo_eps_pitch_input; - string demo_eps_pitch_input_file; + std::string demo_eps_pitch_input_file; double demo_eps_pitch_input_timeArray[100]; int demo_eps_pitch_input_daArray[100]; int demo_eps_pitch_input_ntime; @@ -2640,7 +2639,7 @@ struct AIRCRAFT int tactile_pitch; #define tactile_pitch aircraft_->tactile_pitch bool demo_ap_pah_on; - string demo_ap_pah_on_file; + std::string demo_ap_pah_on_file; double demo_ap_pah_on_timeArray[10]; int demo_ap_pah_on_daArray[10]; int demo_ap_pah_on_ntime; @@ -2652,7 +2651,7 @@ struct AIRCRAFT #define demo_ap_pah_on_ntime aircraft_->demo_ap_pah_on_ntime #define demo_ap_pah_on_startTime aircraft_->demo_ap_pah_on_startTime bool demo_ap_alh_on; - string demo_ap_alh_on_file; + std::string demo_ap_alh_on_file; double demo_ap_alh_on_timeArray[10]; int demo_ap_alh_on_daArray[10]; int demo_ap_alh_on_ntime; @@ -2664,7 +2663,7 @@ struct AIRCRAFT #define demo_ap_alh_on_ntime aircraft_->demo_ap_alh_on_ntime #define demo_ap_alh_on_startTime aircraft_->demo_ap_alh_on_startTime bool demo_ap_rah_on; - string demo_ap_rah_on_file; + std::string demo_ap_rah_on_file; double demo_ap_rah_on_timeArray[10]; int demo_ap_rah_on_daArray[10]; int demo_ap_rah_on_ntime; @@ -2676,7 +2675,7 @@ struct AIRCRAFT #define demo_ap_rah_on_ntime aircraft_->demo_ap_rah_on_ntime #define demo_ap_rah_on_startTime aircraft_->demo_ap_rah_on_startTime bool demo_ap_hh_on; - string demo_ap_hh_on_file; + std::string demo_ap_hh_on_file; double demo_ap_hh_on_timeArray[10]; int demo_ap_hh_on_daArray[10]; int demo_ap_hh_on_ntime; @@ -2688,7 +2687,7 @@ struct AIRCRAFT #define demo_ap_hh_on_ntime aircraft_->demo_ap_hh_on_ntime #define demo_ap_hh_on_startTime aircraft_->demo_ap_hh_on_startTime bool demo_ap_Theta_ref; - string demo_ap_Theta_ref_file; + std::string demo_ap_Theta_ref_file; double demo_ap_Theta_ref_timeArray[10]; double demo_ap_Theta_ref_daArray[10]; int demo_ap_Theta_ref_ntime; @@ -2700,7 +2699,7 @@ struct AIRCRAFT #define demo_ap_Theta_ref_ntime aircraft_->demo_ap_Theta_ref_ntime #define demo_ap_Theta_ref_startTime aircraft_->demo_ap_Theta_ref_startTime bool demo_ap_alt_ref; - string demo_ap_alt_ref_file; + std::string demo_ap_alt_ref_file; double demo_ap_alt_ref_timeArray[10]; double demo_ap_alt_ref_daArray[10]; int demo_ap_alt_ref_ntime; @@ -2712,7 +2711,7 @@ struct AIRCRAFT #define demo_ap_alt_ref_ntime aircraft_->demo_ap_alt_ref_ntime #define demo_ap_alt_ref_startTime aircraft_->demo_ap_alt_ref_startTime bool demo_ap_Phi_ref; - string demo_ap_Phi_ref_file; + std::string demo_ap_Phi_ref_file; double demo_ap_Phi_ref_timeArray[10]; double demo_ap_Phi_ref_daArray[10]; int demo_ap_Phi_ref_ntime; @@ -2724,7 +2723,7 @@ struct AIRCRAFT #define demo_ap_Phi_ref_ntime aircraft_->demo_ap_Phi_ref_ntime #define demo_ap_Phi_ref_startTime aircraft_->demo_ap_Phi_ref_startTime bool demo_ap_Psi_ref; - string demo_ap_Psi_ref_file; + std::string demo_ap_Psi_ref_file; double demo_ap_Psi_ref_timeArray[10]; double demo_ap_Psi_ref_daArray[10]; int demo_ap_Psi_ref_ntime; @@ -2736,7 +2735,7 @@ struct AIRCRAFT #define demo_ap_Psi_ref_ntime aircraft_->demo_ap_Psi_ref_ntime #define demo_ap_Psi_ref_startTime aircraft_->demo_ap_Psi_ref_startTime bool demo_tactile; - string demo_tactile_file; + std::string demo_tactile_file; double demo_tactile_timeArray[1500]; double demo_tactile_daArray[1500]; int demo_tactile_ntime; @@ -2748,7 +2747,7 @@ struct AIRCRAFT #define demo_tactile_ntime aircraft_->demo_tactile_ntime #define demo_tactile_startTime aircraft_->demo_tactile_startTime bool demo_ice_tail; - string demo_ice_tail_file; + std::string demo_ice_tail_file; double demo_ice_tail_timeArray[10]; int demo_ice_tail_daArray[10]; int demo_ice_tail_ntime; @@ -2760,7 +2759,7 @@ struct AIRCRAFT #define demo_ice_tail_ntime aircraft_->demo_ice_tail_ntime #define demo_ice_tail_startTime aircraft_->demo_ice_tail_startTime bool demo_ice_left; - string demo_ice_left_file; + std::string demo_ice_left_file; double demo_ice_left_timeArray[10]; int demo_ice_left_daArray[10]; int demo_ice_left_ntime; @@ -2772,7 +2771,7 @@ struct AIRCRAFT #define demo_ice_left_ntime aircraft_->demo_ice_left_ntime #define demo_ice_left_startTime aircraft_->demo_ice_left_startTime bool demo_ice_right; - string demo_ice_right_file; + std::string demo_ice_right_file; double demo_ice_right_timeArray[10]; int demo_ice_right_daArray[10]; int demo_ice_right_ntime; @@ -2788,7 +2787,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* fog =========== Fog field quantities ======================== */ - std::map fog_map; + std::map fog_map; #define fog_map aircraft_->fog_map bool fog_field; @@ -2816,7 +2815,7 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* record ======== Record desired quantites to file =============*/ - std::map record_map; + std::map record_map; #define record_map aircraft_->record_map /***** Angles ******/ @@ -2894,12 +2893,12 @@ struct AIRCRAFT /* Variables (token2) ===========================================*/ /* misc ========== Miscellaneous input commands =================*/ - std::map misc_map; + std::map misc_map; #define misc_map aircraft_->misc_map double simpleHingeMomentCoef; #define simpleHingeMomentCoef aircraft_->simpleHingeMomentCoef - //string dfTimefdf; + //std::string dfTimefdf; //double dfTimefdf_dfArray[100]; //double dfTimefdf_TimeArray[100]; //int dfTimefdf_ndf; @@ -3096,5 +3095,3 @@ struct AIRCRAFT }; extern AIRCRAFT *aircraft_; // usually defined in the first program that includes uiuc_aircraft.h - -#endif // endif _AIRCRAFT_H diff --git a/src/FDM/UIUCModel/uiuc_coef_drag.cpp b/src/FDM/UIUCModel/uiuc_coef_drag.cpp index 2ef4d5aab..d54097c64 100644 --- a/src/FDM/UIUCModel/uiuc_coef_drag.cpp +++ b/src/FDM/UIUCModel/uiuc_coef_drag.cpp @@ -88,8 +88,8 @@ void uiuc_coef_drag() { - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; stack command_list; double q_nondim; diff --git a/src/FDM/UIUCModel/uiuc_coef_lift.cpp b/src/FDM/UIUCModel/uiuc_coef_lift.cpp index 731cdbfdc..fcd804021 100644 --- a/src/FDM/UIUCModel/uiuc_coef_lift.cpp +++ b/src/FDM/UIUCModel/uiuc_coef_lift.cpp @@ -89,8 +89,8 @@ void uiuc_coef_lift() { - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; stack command_list; double q_nondim; diff --git a/src/FDM/UIUCModel/uiuc_coef_pitch.cpp b/src/FDM/UIUCModel/uiuc_coef_pitch.cpp index 673f9c2a1..b6071e9eb 100644 --- a/src/FDM/UIUCModel/uiuc_coef_pitch.cpp +++ b/src/FDM/UIUCModel/uiuc_coef_pitch.cpp @@ -89,8 +89,8 @@ void uiuc_coef_pitch() { - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; stack command_list; double q_nondim; diff --git a/src/FDM/UIUCModel/uiuc_coef_roll.cpp b/src/FDM/UIUCModel/uiuc_coef_roll.cpp index 5fe3c789d..031f0821c 100644 --- a/src/FDM/UIUCModel/uiuc_coef_roll.cpp +++ b/src/FDM/UIUCModel/uiuc_coef_roll.cpp @@ -90,8 +90,8 @@ void uiuc_coef_roll() { - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; stack command_list; double p_nondim; diff --git a/src/FDM/UIUCModel/uiuc_coef_sideforce.cpp b/src/FDM/UIUCModel/uiuc_coef_sideforce.cpp index ab4b48c7f..a0d37f9d3 100644 --- a/src/FDM/UIUCModel/uiuc_coef_sideforce.cpp +++ b/src/FDM/UIUCModel/uiuc_coef_sideforce.cpp @@ -90,8 +90,8 @@ void uiuc_coef_sideforce() { - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; stack command_list; double p_nondim; diff --git a/src/FDM/UIUCModel/uiuc_coef_yaw.cpp b/src/FDM/UIUCModel/uiuc_coef_yaw.cpp index 6e6442b9f..d17c3a2d4 100644 --- a/src/FDM/UIUCModel/uiuc_coef_yaw.cpp +++ b/src/FDM/UIUCModel/uiuc_coef_yaw.cpp @@ -90,8 +90,8 @@ void uiuc_coef_yaw() { - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; stack command_list; double p_nondim; diff --git a/src/FDM/UIUCModel/uiuc_coefficients.cpp b/src/FDM/UIUCModel/uiuc_coefficients.cpp index 9c04e758e..bb160eb4f 100644 --- a/src/FDM/UIUCModel/uiuc_coefficients.cpp +++ b/src/FDM/UIUCModel/uiuc_coefficients.cpp @@ -100,7 +100,7 @@ void uiuc_coefficients(double dt) { - static string uiuc_coefficients_error = " (from uiuc_coefficients.cpp) "; + static std::string uiuc_coefficients_error = " (from uiuc_coefficients.cpp) "; double l_trim, l_defl; double V_rel_wind_dum, U_body_dum; diff --git a/src/FDM/UIUCModel/uiuc_engine.cpp b/src/FDM/UIUCModel/uiuc_engine.cpp index 1cf7839a1..65538e68c 100644 --- a/src/FDM/UIUCModel/uiuc_engine.cpp +++ b/src/FDM/UIUCModel/uiuc_engine.cpp @@ -75,8 +75,8 @@ void uiuc_engine() { stack command_list; - string linetoken1; - string linetoken2; + std::string linetoken1; + std::string linetoken2; if (outside_control == false) pilot_throttle_no = false; diff --git a/src/FDM/UIUCModel/uiuc_flapdata.cpp b/src/FDM/UIUCModel/uiuc_flapdata.cpp index 4112586db..989052434 100644 --- a/src/FDM/UIUCModel/uiuc_flapdata.cpp +++ b/src/FDM/UIUCModel/uiuc_flapdata.cpp @@ -126,7 +126,7 @@ FlapData::~FlapData(){ //returns zero if it was successful int FlapData::init(const char* filename){ - ifstream* f=new ifstream(filename); //open file for reading in text (ascii) mode + std::ifstream* f=new std::ifstream(filename); //open file for reading in text (ascii) mode if (f==NULL) { //file open error return(1); } @@ -259,7 +259,7 @@ double FlapData::interpolate(double x0, double y0, double x1, double y1, double //A function called by init that reads in the file //of the correct format and stores it in the arrays and tables -int FlapData::readIn (ifstream* f){ +int FlapData::readIn (std::ifstream* f){ int i,j,k,l; //int count=0; diff --git a/src/FDM/UIUCModel/uiuc_flapdata.h b/src/FDM/UIUCModel/uiuc_flapdata.h index 28b1c7b9f..47c1329d8 100644 --- a/src/FDM/UIUCModel/uiuc_flapdata.h +++ b/src/FDM/UIUCModel/uiuc_flapdata.h @@ -5,8 +5,8 @@ Written by Theresa Robinson robinst@ecf.toronto.edu */ -#ifndef _FLAPDATA_H -#define _FLAPDATA_H +#pragma once + #include #include @@ -16,8 +16,6 @@ robinst@ecf.toronto.edu #include "uiuc_warnings_errors.h" //#include "uiuc_aircraft.h" -using std::ifstream; -using std::istringstream; class flapStruct { private: @@ -101,7 +99,5 @@ class FlapData { double interpolate(double x1, double y1, double x2, double y2, double x); //A function called by init that reads in the file //of the correct format and stores it in the arrays and tables - int readIn(ifstream* f); + int readIn(std::ifstream* f); }; - -#endif diff --git a/src/FDM/UIUCModel/uiuc_menu.cpp b/src/FDM/UIUCModel/uiuc_menu.cpp index 9315d65dc..77fba04a4 100644 --- a/src/FDM/UIUCModel/uiuc_menu.cpp +++ b/src/FDM/UIUCModel/uiuc_menu.cpp @@ -166,6 +166,8 @@ #include "uiuc_menu.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu.h b/src/FDM/UIUCModel/uiuc_menu.h index e699f1f45..78bfa9519 100644 --- a/src/FDM/UIUCModel/uiuc_menu.h +++ b/src/FDM/UIUCModel/uiuc_menu.h @@ -1,6 +1,5 @@ -#ifndef _MENU_H_ -#define _MENU_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -30,7 +29,5 @@ #include "uiuc_menu_record.h" #include "uiuc_menu_misc.h" -//bool check_float(const string &token); // To check whether the token is a float or not -void uiuc_menu (string aircraft); - -#endif //_MENU_H_ +//bool check_float(const std::string &token); // To check whether the token is a float or not +void uiuc_menu (std::string aircraft); diff --git a/src/FDM/UIUCModel/uiuc_menu_CD.cpp b/src/FDM/UIUCModel/uiuc_menu_CD.cpp index 1d1017a1e..119917a2d 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CD.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_CD.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_CD.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_CD.h b/src/FDM/UIUCModel/uiuc_menu_CD.h index a986d7bde..83745d3dd 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CD.h +++ b/src/FDM/UIUCModel/uiuc_menu_CD.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CD_H_ -#define _MENU_CD_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_CD( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_CD( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CD_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_CL.cpp b/src/FDM/UIUCModel/uiuc_menu_CL.cpp index 1270279be..3ae72bcc9 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CL.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_CL.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_CL.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_CL.h b/src/FDM/UIUCModel/uiuc_menu_CL.h index d976967db..43d9c9a11 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CL.h +++ b/src/FDM/UIUCModel/uiuc_menu_CL.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CL_H_ -#define _MENU_CL_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_CL( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_CL( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CL_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_CY.cpp b/src/FDM/UIUCModel/uiuc_menu_CY.cpp index d32d3dc6c..16c4955eb 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CY.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_CY.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_CY.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_CY.h b/src/FDM/UIUCModel/uiuc_menu_CY.h index 7bb8f2271..a18783a74 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CY.h +++ b/src/FDM/UIUCModel/uiuc_menu_CY.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CY_H_ -#define _MENU_CY_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_CY( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_CY( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CY_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_Cm.cpp b/src/FDM/UIUCModel/uiuc_menu_Cm.cpp index 76edf7511..54f1a0bfa 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Cm.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_Cm.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_Cm.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_Cm.h b/src/FDM/UIUCModel/uiuc_menu_Cm.h index 3772bfef7..b95a08a9d 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Cm.h +++ b/src/FDM/UIUCModel/uiuc_menu_Cm.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CM_H_ -#define _MENU_CM_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_Cm( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_Cm( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CM_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_Cn.cpp b/src/FDM/UIUCModel/uiuc_menu_Cn.cpp index dac41b1a4..802283a12 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Cn.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_Cn.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_Cn.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_Cn.h b/src/FDM/UIUCModel/uiuc_menu_Cn.h index 8b4da0be3..6be107706 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Cn.h +++ b/src/FDM/UIUCModel/uiuc_menu_Cn.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CN_H_ -#define _MENU_CN_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_Cn( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_Cn( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CN_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_Croll.cpp b/src/FDM/UIUCModel/uiuc_menu_Croll.cpp index 7ffc58ac0..8c22267fe 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Croll.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_Croll.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_Croll.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_Croll.h b/src/FDM/UIUCModel/uiuc_menu_Croll.h index af98ba7a5..f8448ab4d 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Croll.h +++ b/src/FDM/UIUCModel/uiuc_menu_Croll.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CROLL_H_ -#define _MENU_CROLL_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_Cl( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_Cl( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CROLL_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp b/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp index 62792291d..f5f79f8af 100644 --- a/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_controlSurface.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_controlSurface.h b/src/FDM/UIUCModel/uiuc_menu_controlSurface.h index f30495157..a3a34e9fc 100644 --- a/src/FDM/UIUCModel/uiuc_menu_controlSurface.h +++ b/src/FDM/UIUCModel/uiuc_menu_controlSurface.h @@ -1,6 +1,5 @@ -#ifndef _MENU_CONTROLSURFACE_H_ -#define _MENU_CONTROLSURFACE_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,12 +10,10 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_controlSurface( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, - const string& aircraft_directory, +void parse_controlSurface( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, + const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_CONTROLSURFACE_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_engine.cpp b/src/FDM/UIUCModel/uiuc_menu_engine.cpp index d2b1e431a..1db888d0a 100644 --- a/src/FDM/UIUCModel/uiuc_menu_engine.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_engine.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_engine.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_engine.h b/src/FDM/UIUCModel/uiuc_menu_engine.h index 92fe247b5..31e4e16f5 100644 --- a/src/FDM/UIUCModel/uiuc_menu_engine.h +++ b/src/FDM/UIUCModel/uiuc_menu_engine.h @@ -1,6 +1,5 @@ -#ifndef _MENU_ENGINE_H_ -#define _MENU_ENGINE_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_engine( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10,const string& aircraft_directory, +void parse_engine( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10,const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_ENGINE_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_fog.cpp b/src/FDM/UIUCModel/uiuc_menu_fog.cpp index 5e931e997..6e9ff37a3 100644 --- a/src/FDM/UIUCModel/uiuc_menu_fog.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_fog.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_fog.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_fog.h b/src/FDM/UIUCModel/uiuc_menu_fog.h index f2c079d46..eb85ca081 100644 --- a/src/FDM/UIUCModel/uiuc_menu_fog.h +++ b/src/FDM/UIUCModel/uiuc_menu_fog.h @@ -1,6 +1,5 @@ -#ifndef _MENU_FOG_H_ -#define _MENU_FOG_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_fog( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_fog( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_FOG_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_functions.cpp b/src/FDM/UIUCModel/uiuc_menu_functions.cpp index c0dd3b2ef..13753d430 100644 --- a/src/FDM/UIUCModel/uiuc_menu_functions.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_functions.cpp @@ -68,10 +68,11 @@ #include "uiuc_menu_functions.h" -bool check_float( const string &token) + +bool check_float( const std::string &token) { float value; - istringstream stream(token.c_str()); + std::istringstream stream(token.c_str()); return !((stream >> value).fail()); } diff --git a/src/FDM/UIUCModel/uiuc_menu_functions.h b/src/FDM/UIUCModel/uiuc_menu_functions.h index 1423c0fe4..a957d56b6 100644 --- a/src/FDM/UIUCModel/uiuc_menu_functions.h +++ b/src/FDM/UIUCModel/uiuc_menu_functions.h @@ -1,6 +1,5 @@ -#ifndef _MENU_FUNCTIONS_H_ -#define _MENU_FUNCTIONS_H_ +#pragma once #include "uiuc_aircraft.h" #include @@ -12,6 +11,4 @@ void d_1_to_2( double array1D[100], double array2D[][100], int index2D); void d_1_to_1( double array1[100], double array2[100] ); void i_1_to_2( int array1D[100], int array2D[][100], int index2D); bool check_float( const std::string &token); -//bool check_float( const string &token); - -#endif //_MENU_FUNCTIONS_H_ +//bool check_float( const std::string &token); diff --git a/src/FDM/UIUCModel/uiuc_menu_gear.cpp b/src/FDM/UIUCModel/uiuc_menu_gear.cpp index 2d55960a9..616dd54a9 100644 --- a/src/FDM/UIUCModel/uiuc_menu_gear.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_gear.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_gear.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_gear.h b/src/FDM/UIUCModel/uiuc_menu_gear.h index a8d984290..90a14b6db 100644 --- a/src/FDM/UIUCModel/uiuc_menu_gear.h +++ b/src/FDM/UIUCModel/uiuc_menu_gear.h @@ -1,6 +1,5 @@ -#ifndef _MENU_GEAR_H_ -#define _MENU_GEAR_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_gear( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_gear( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_GEAR_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_geometry.cpp b/src/FDM/UIUCModel/uiuc_menu_geometry.cpp index 1dca82c3f..7a67847e4 100644 --- a/src/FDM/UIUCModel/uiuc_menu_geometry.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_geometry.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_geometry.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_geometry.h b/src/FDM/UIUCModel/uiuc_menu_geometry.h index 9e834ca92..ac61b8466 100644 --- a/src/FDM/UIUCModel/uiuc_menu_geometry.h +++ b/src/FDM/UIUCModel/uiuc_menu_geometry.h @@ -1,6 +1,5 @@ -#ifndef _MENU_GEOMETRY_H_ -#define _MENU_GEOMETRY_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_geometry( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, - const string& aircraft_directory, LIST command_line ); - -#endif //_MENU_GEOMETRY_H_ +void parse_geometry( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, + const std::string& aircraft_directory, LIST command_line ); diff --git a/src/FDM/UIUCModel/uiuc_menu_ice.cpp b/src/FDM/UIUCModel/uiuc_menu_ice.cpp index 55528b02d..7cf0932b8 100644 --- a/src/FDM/UIUCModel/uiuc_menu_ice.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_ice.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_ice.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_ice.h b/src/FDM/UIUCModel/uiuc_menu_ice.h index 6d996b1c1..7eaa2a8de 100644 --- a/src/FDM/UIUCModel/uiuc_menu_ice.h +++ b/src/FDM/UIUCModel/uiuc_menu_ice.h @@ -1,6 +1,5 @@ -#ifndef _MENU_ICE_H_ -#define _MENU_ICE_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_ice( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_ice( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_ICE_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_init.cpp b/src/FDM/UIUCModel/uiuc_menu_init.cpp index bda8e7f7f..6a96deba6 100644 --- a/src/FDM/UIUCModel/uiuc_menu_init.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_init.cpp @@ -80,6 +80,8 @@ #include "uiuc_menu_init.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_init.h b/src/FDM/UIUCModel/uiuc_menu_init.h index 6b793eae9..0a3515470 100644 --- a/src/FDM/UIUCModel/uiuc_menu_init.h +++ b/src/FDM/UIUCModel/uiuc_menu_init.h @@ -1,6 +1,5 @@ -#ifndef _MENU_INIT_H_ -#define _MENU_INIT_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_init( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_init( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_INIT_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_mass.cpp b/src/FDM/UIUCModel/uiuc_menu_mass.cpp index f1f3115a1..e21ae0102 100644 --- a/src/FDM/UIUCModel/uiuc_menu_mass.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_mass.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_mass.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_mass.h b/src/FDM/UIUCModel/uiuc_menu_mass.h index 9ec697ecf..e9f24f05e 100644 --- a/src/FDM/UIUCModel/uiuc_menu_mass.h +++ b/src/FDM/UIUCModel/uiuc_menu_mass.h @@ -1,6 +1,5 @@ -#ifndef _MENU_MASS_H_ -#define _MENU_MASS_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +10,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_mass( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10,const string& aircraft_directory, +void parse_mass( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10,const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_MASS_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_misc.cpp b/src/FDM/UIUCModel/uiuc_menu_misc.cpp index 58db1c53a..7ac0ea4c7 100644 --- a/src/FDM/UIUCModel/uiuc_menu_misc.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_misc.cpp @@ -79,6 +79,8 @@ #include "uiuc_menu_misc.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_misc.h b/src/FDM/UIUCModel/uiuc_menu_misc.h index 27870ae6d..c7e9ad8f7 100644 --- a/src/FDM/UIUCModel/uiuc_menu_misc.h +++ b/src/FDM/UIUCModel/uiuc_menu_misc.h @@ -1,6 +1,5 @@ -#ifndef _MENU_MISC_H_ -#define _MENU_MISC_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -12,11 +11,9 @@ #include /* INVG defined */ #include "uiuc_flapdata.h" -void parse_misc( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_misc( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_MISC_H_ diff --git a/src/FDM/UIUCModel/uiuc_menu_record.cpp b/src/FDM/UIUCModel/uiuc_menu_record.cpp index d64188a13..82158981c 100644 --- a/src/FDM/UIUCModel/uiuc_menu_record.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_record.cpp @@ -82,6 +82,8 @@ #include "uiuc_menu_record.h" +using std::string; +using std::istringstream; using std::cerr; using std::cout; using std::endl; diff --git a/src/FDM/UIUCModel/uiuc_menu_record.h b/src/FDM/UIUCModel/uiuc_menu_record.h index ae2bb892e..0996225d8 100644 --- a/src/FDM/UIUCModel/uiuc_menu_record.h +++ b/src/FDM/UIUCModel/uiuc_menu_record.h @@ -1,6 +1,4 @@ - -#ifndef _MENU_RECORD_H_ -#define _MENU_RECORD_H_ +#pragma once #include "uiuc_aircraft.h" #include "uiuc_convert.h" @@ -11,11 +9,9 @@ #include /* Long_trim defined */ #include /* INVG defined */ -void parse_record( const string& linetoken2, const string& linetoken3, - const string& linetoken4, const string& linetoken5, - const string& linetoken6, const string& linetoken7, - const string& linetoken8, const string& linetoken9, - const string& linetoken10, const string& aircraft_directory, +void parse_record( const std::string& linetoken2, const std::string& linetoken3, + const std::string& linetoken4, const std::string& linetoken5, + const std::string& linetoken6, const std::string& linetoken7, + const std::string& linetoken8, const std::string& linetoken9, + const std::string& linetoken10, const std::string& aircraft_directory, LIST command_line ); - -#endif //_MENU_RECORD_H_ diff --git a/src/FDM/UIUCModel/uiuc_parsefile.cpp b/src/FDM/UIUCModel/uiuc_parsefile.cpp index 69040a22d..99e81952a 100644 --- a/src/FDM/UIUCModel/uiuc_parsefile.cpp +++ b/src/FDM/UIUCModel/uiuc_parsefile.cpp @@ -67,6 +67,8 @@ #include "uiuc_parsefile.h" +using std::string; + ParseFile :: ParseFile (const string fileName) { diff --git a/src/FDM/UIUCModel/uiuc_parsefile.h b/src/FDM/UIUCModel/uiuc_parsefile.h index 4c8fb23e8..de7daefbb 100644 --- a/src/FDM/UIUCModel/uiuc_parsefile.h +++ b/src/FDM/UIUCModel/uiuc_parsefile.h @@ -1,5 +1,4 @@ -#ifndef _PARSE_FILE_H_ -#define _PARSE_FILE_H_ +#pragma once #include @@ -7,37 +6,31 @@ #include #include -using std::list; -using std::string; -using std::getline; -using std::ifstream; #define DELIMITERS " \t" #define COMMENT "#" #define MAXLINE 400 // Max size of the line of the input file -typedef list stack; //list to contain the input file "command_lines" +typedef std::list stack; //list to contain the input file "command_lines" class ParseFile { private: ::stack commands; - ifstream file; + std::ifstream file; void readFile(); public: ParseFile() {} - ParseFile(const string fileName); + ParseFile(const std::string fileName); ~ParseFile(); - void removeComments(string& inputLine); - string getToken(string inputLine, int tokenNo); - void storeCommands(string inputLine); + void removeComments(std::string& inputLine); + std::string getToken(std::string inputLine, int tokenNo); + void storeCommands(std::string inputLine); ::stack getCommands(); }; - -#endif // _PARSE_FILE_H_ diff --git a/src/Instrumentation/mk_viii.hxx b/src/Instrumentation/mk_viii.hxx index e65c58795..d0c528e14 100644 --- a/src/Instrumentation/mk_viii.hxx +++ b/src/Instrumentation/mk_viii.hxx @@ -18,8 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef __INSTRUMENTS_MK_VIII_HXX -#define __INSTRUMENTS_MK_VIII_HXX +#pragma once #include @@ -30,9 +29,6 @@ #include #include #include -using std::vector; -using std::deque; -using std::map; class SGSampleGroup; @@ -578,7 +574,7 @@ class MK_VIII : public SGSubsystem class TerrainClearanceFilter { - typedef deque< Sample > samples_type; + typedef std::deque< Sample > samples_type; samples_type samples; double value; double last_update; @@ -613,7 +609,7 @@ class MK_VIII : public SGSubsystem bool last_landing_gear; bool last_real_flaps_down; - typedef deque< Sample< Parameter > > altitude_samples_type; + typedef std::deque< Sample< Parameter > > altitude_samples_type; altitude_samples_type altitude_samples; struct @@ -1387,5 +1383,3 @@ public: #ifdef _MSC_VER # pragma warning( pop ) #endif - -#endif // __INSTRUMENTS_MK_VIII_HXX diff --git a/src/Instrumentation/tcas.hxx b/src/Instrumentation/tcas.hxx index 1f0c5d543..1122c9711 100644 --- a/src/Instrumentation/tcas.hxx +++ b/src/Instrumentation/tcas.hxx @@ -18,8 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -#ifndef __INSTRUMENTS_TCAS_HXX -#define __INSTRUMENTS_TCAS_HXX +#pragma once #include @@ -31,10 +30,6 @@ #include #include -using std::vector; -using std::deque; -using std::map; - class SGSampleGroup; #include
@@ -133,7 +128,7 @@ class TCAS : public SGSubsystem double RAtimestamp; } TrackerTarget; - typedef map TrackerTargets; + typedef std::map TrackerTargets; typedef struct { @@ -408,5 +403,3 @@ public: #ifdef _MSC_VER # pragma warning( pop ) #endif - -#endif // __INSTRUMENTS_TCAS_HXX diff --git a/src/Network/AV400WSim.hxx b/src/Network/AV400WSim.hxx index e79b562c4..5a8a92110 100644 --- a/src/Network/AV400WSim.hxx +++ b/src/Network/AV400WSim.hxx @@ -24,10 +24,7 @@ // // $Id$ - -#ifndef _FG_AV400WSIM_HXX -#define _FG_AV400WSIM_HXX - +#pragma once #include #include @@ -37,8 +34,6 @@ #include "protocol.hxx" -using std::string; - class FlightProperties; ////////////////////////////////////////////////////////////////////////////// @@ -84,9 +79,9 @@ class FGAV400WSimB : public FGProtocol { int hz2count; int hz2cycles; char flight_phase; - string hal; - string val; - string sbas_sel; + std::string hal; + std::string val; + std::string sbas_sel; bool req_hostid; bool req_sbas; int outputctr; @@ -119,9 +114,9 @@ public: bool gen_Wm_message(); bool gen_Wv_message(); - bool verify_checksum( string message, int datachars ); - string asciitize_message( string message ); - string buffer_to_string(); + bool verify_checksum( std::string message, int datachars ); + std::string asciitize_message( std::string message ); + std::string buffer_to_string(); bool parse_message(); // open hailing frequencies @@ -137,7 +132,3 @@ public: inline void set_hz2( double t ) { hz2 = t, hz2cycles = get_hz() / hz2; } }; - - - -#endif // _FG_AV400WSIM_HXX diff --git a/src/Network/garmin.cxx b/src/Network/garmin.cxx index 1696aa9ad..ac517b695 100644 --- a/src/Network/garmin.cxx +++ b/src/Network/garmin.cxx @@ -87,7 +87,7 @@ void FGGarmin::parse_message(const std::vector& tokens) double altitude = atof( tokens[1].c_str() ); // #2: altitude units - const string& alt_units = tokens[2]; + const std::string& alt_units = tokens[2]; if ( alt_units != "F" && alt_units != "f" ) altitude *= SG_METER_TO_FEET; diff --git a/src/Network/generic.hxx b/src/Network/generic.hxx index 3ae04ebb9..ad04c4162 100644 --- a/src/Network/generic.hxx +++ b/src/Network/generic.hxx @@ -20,10 +20,7 @@ // // $Id$ - -#ifndef _FG_SERIAL_HXX -#define _FG_SERIAL_HXX - +#pragma once #include @@ -31,13 +28,12 @@ #include "protocol.hxx" -using std::string; class FGGeneric : public FGProtocol { public: - FGGeneric(vector); + FGGeneric(vector); ~FGGeneric(); bool gen_message(); @@ -62,8 +58,8 @@ protected: enum e_type { FG_BOOL=0, FG_INT, FG_FLOAT, FG_DOUBLE, FG_STRING, FG_FIXED, FG_BYTE, FG_WORD }; typedef struct { - // string name; - string format; + // std::string name; + std::string format; e_type type; double offset; double factor; @@ -75,17 +71,17 @@ protected: private: - string file_name; + std::string file_name; int length; char buf[ FG_MAX_MSG_SIZE ]; - string preamble; - string postamble; - string var_separator; - string line_separator; - string var_sep_string; - string line_sep_string; + std::string preamble; + std::string postamble; + std::string var_separator; + std::string line_separator; + std::string var_sep_string; + std::string line_sep_string; vector<_serial_prot> _out_message; vector<_serial_prot> _in_message; @@ -126,8 +122,3 @@ private: // Special handling for bool (relative change = toggle, no min/max, no wrap) static void updateValue(_serial_prot& prot, bool val); }; - - -#endif // _FG_SERIAL_HXX - - diff --git a/src/Network/joyclient.hxx b/src/Network/joyclient.hxx index 47a73667b..2e97d7b3b 100644 --- a/src/Network/joyclient.hxx +++ b/src/Network/joyclient.hxx @@ -20,10 +20,7 @@ // // $Id$ - -#ifndef _FG_JOYCLIENT_HXX -#define _FG_JOYCLIENT_HXX - +#pragma once #include @@ -33,8 +30,6 @@ #include "protocol.hxx" -using std::string; - class FGJoyClient : public FGProtocol { @@ -54,6 +49,3 @@ public: // close the channel bool close(); }; - - -#endif // _FG_JOYCLIENT_HXX diff --git a/src/Network/jsclient.hxx b/src/Network/jsclient.hxx index 695d98703..0144bfec3 100644 --- a/src/Network/jsclient.hxx +++ b/src/Network/jsclient.hxx @@ -21,10 +21,7 @@ // // $Id$ - -#ifndef _FG_JSCLIENT_HXX -#define _FG_JSCLIENT_HXX - +#pragma once #include @@ -34,15 +31,13 @@ #include "protocol.hxx" -using std::string; - class FGJsClient : public FGProtocol { char buf[256]; double axis[4]; SGPropertyNode_ptr axisdef[4]; - string axisdefstr[4]; + std::string axisdefstr[4]; bool active; public: @@ -59,6 +54,3 @@ public: // close the channel bool close(); }; - - -#endif // _FG_JSCLIENT_HXX diff --git a/src/Network/native_ctrls.hxx b/src/Network/native_ctrls.hxx index a7404c9cb..7c3e9a636 100644 --- a/src/Network/native_ctrls.hxx +++ b/src/Network/native_ctrls.hxx @@ -21,9 +21,7 @@ // $Id$ -#ifndef _FG_NATIVE_CTRLS_HXX -#define _FG_NATIVE_CTRLS_HXX - +#pragma once #include @@ -37,7 +35,6 @@ using FG_DDS_Ctrls = FGNetCtrls; #endif -using std::string; class FGNativeCtrls : public FGProtocol { @@ -60,5 +57,3 @@ public: // close the channel bool close(); }; - -#endif // _FG_NATIVE_CTRLS_HXX diff --git a/src/Network/nmea.hxx b/src/Network/nmea.hxx index 96a759d01..3c2b83dcb 100644 --- a/src/Network/nmea.hxx +++ b/src/Network/nmea.hxx @@ -20,9 +20,7 @@ // // $Id$ - -#ifndef _FG_NMEA_HXX -#define _FG_NMEA_HXX +#pragma once #include @@ -52,7 +50,7 @@ protected: bool mBiDirectionalSupport; FlightProperties mFdm; const char* mLineFeed; - string mNmeaSentence; + std::string mNmeaSentence; void add_with_checksum(char *sentence, unsigned int buf_size); @@ -78,5 +76,3 @@ public: // close the channel virtual bool close(); }; - -#endif // _FG_NMEA_HXX diff --git a/src/Network/protocol.cxx b/src/Network/protocol.cxx index 1419430c1..fdf8681f4 100644 --- a/src/Network/protocol.cxx +++ b/src/Network/protocol.cxx @@ -108,7 +108,7 @@ bool FGProtocol::parse_message() { } -void FGProtocol::set_direction( const string& d ) { +void FGProtocol::set_direction( const std::string& d ) { if ( d == "in" ) { dir = SG_IO_IN; } else if ( d == "out" ) { diff --git a/src/Network/protocol.hxx b/src/Network/protocol.hxx index d5d37fbc9..7cc6f9ae0 100644 --- a/src/Network/protocol.hxx +++ b/src/Network/protocol.hxx @@ -21,9 +21,7 @@ // $Id$ -#ifndef _PROTOCOL_HXX -#define _PROTOCOL_HXX - +#pragma once #include #include @@ -31,9 +29,6 @@ #include #include -using std::string; -using std::vector; - #define FG_MAX_MSG_SIZE 16384 @@ -47,7 +42,7 @@ private: SGProtocolDir dir; - // string protocol_str; + // std::string protocol_str; // char buf[FG_MAX_MSG_SIZE]; // int length; @@ -68,7 +63,7 @@ public: virtual void reinit(); inline SGProtocolDir get_direction() const { return dir; } - void set_direction( const string& d ); + void set_direction( const std::string& d ); inline double get_hz() const { return hz; } inline void set_hz( double t ) { hz = t; } @@ -82,8 +77,8 @@ public: virtual bool gen_message(); virtual bool parse_message(); - // inline string get_protocol() const { return protocol_str; } - // inline void set_protocol( const string& str ) { protocol_str = str; } + // inline std::string get_protocol() const { return protocol_str; } + // inline void set_protocol( const std::string& str ) { protocol_str = str; } // inline char *get_buf() { return buf; } // inline int get_length() const { return length; } @@ -101,23 +96,17 @@ public: }; -typedef vector < FGProtocol * > io_container; +typedef std::vector < FGProtocol * > io_container; typedef io_container::iterator io_iterator; typedef io_container::const_iterator const_io_iterator; #include -using std::invalid_argument; //namespace flightgear { namespace network { -class FGProtocolConfigError : public invalid_argument +class FGProtocolConfigError : public std::invalid_argument { public: - FGProtocolConfigError( const string& what_string ) - : invalid_argument(what_string) {} + FGProtocolConfigError( const std::string& what_string ) + : std::invalid_argument(what_string) {} }; //}} // end namespace flightgear::network - - -#endif // _PROTOCOL_HXX - - diff --git a/src/Network/pve.hxx b/src/Network/pve.hxx index 929e9e1a3..315d055d2 100644 --- a/src/Network/pve.hxx +++ b/src/Network/pve.hxx @@ -21,9 +21,7 @@ // $Id$ -#ifndef _FG_PVE_HXX -#define _FG_PVE_HXX - +#pragma once #include @@ -31,8 +29,6 @@ #include "protocol.hxx" -using std::string; - class FGPVE : public FGProtocol { @@ -50,8 +46,3 @@ public: // process work for this port bool process(); }; - - -#endif // _FG_PVE_HXX - - diff --git a/src/Network/ray.hxx b/src/Network/ray.hxx index d304c408f..56cab3b84 100644 --- a/src/Network/ray.hxx +++ b/src/Network/ray.hxx @@ -21,9 +21,7 @@ // $Id$ -#ifndef _FG_RAY_HXX -#define _FG_RAY_HXX - +#pragma once #include // FILE @@ -33,8 +31,6 @@ #include "protocol.hxx" -using std::string; - class FGRAY : public FGProtocol { @@ -58,6 +54,3 @@ public: // process work for this port bool process(); }; - - -#endif // _FG_RAY_HXX diff --git a/src/Network/rul.hxx b/src/Network/rul.hxx index b19b9556d..2859b067f 100644 --- a/src/Network/rul.hxx +++ b/src/Network/rul.hxx @@ -22,9 +22,7 @@ // $Id$ -#ifndef _FG_RUL_HXX -#define _FG_RUL_HXX - +#pragma once #include @@ -32,8 +30,6 @@ #include "protocol.hxx" -using std::string; - class FGRUL : public FGProtocol { @@ -51,8 +47,3 @@ public: // process work for this port bool process(); }; - - -#endif // _FG_RUL_HXX - - diff --git a/src/Radio/antenna.hxx b/src/Radio/antenna.hxx index 55247e61e..3457ab4a9 100644 --- a/src/Radio/antenna.hxx +++ b/src/Radio/antenna.hxx @@ -16,6 +16,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#pragma once + #ifndef __cplusplus # error This library requires C++ #endif @@ -27,7 +29,6 @@ #include #include -using std::string; class FGRadioAntenna { @@ -39,7 +40,7 @@ private: * @param: name of file * @return: none ***/ - void load_NEC_antenna_pattern(string type); + void load_NEC_antenna_pattern(std::string type); int _mirror_y; int _mirror_z; @@ -57,7 +58,7 @@ private: public: - FGRadioAntenna(string type); + FGRadioAntenna(std::string type); ~FGRadioAntenna(); /*** calculate far-field antenna gain on a 3D volume around it diff --git a/src/Radio/radio.hxx b/src/Radio/radio.hxx index d6ff10349..bf3d6f338 100644 --- a/src/Radio/radio.hxx +++ b/src/Radio/radio.hxx @@ -16,6 +16,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#pragma once #ifndef __cplusplus # error This library requires C++ @@ -30,8 +31,6 @@ #include #include "antenna.hxx" -using std::string; - class FGRadioTransmission { @@ -48,7 +47,7 @@ private: double _terrain_sampling_distance; int _polarization; - std::map _mat_database; + std::map _mat_database; SGPropertyNode *_root_node; int _propagation_model; /// 0 none, 1 round Earth, 2 ITM double polarization_loss(); @@ -74,7 +73,7 @@ private: * @param: frequency, elevation data, terrain type, horizon distances, calculated loss * @return: none ***/ - void calculate_clutter_loss(double freq, double itm_elev[], std::deque &materials, + void calculate_clutter_loss(double freq, double itm_elev[], std::deque &materials, double transmitter_height, double receiver_height, int p_mode, double horizons[], double &clutter_loss); @@ -82,7 +81,7 @@ private: * @param: terrain type, median clutter height, radiowave attenuation factor * @return: none ***/ - void get_material_properties(string* mat_name, double &height, double &density); + void get_material_properties(std::string* mat_name, double &height, double &density); public: @@ -117,13 +116,13 @@ public: * @param: transmitter position, frequency, ATC text, flag to indicate whether the transmission comes from an ATC groundstation * @return: none ***/ - void receiveATC(SGGeod tx_pos, double freq, string text, int transmission_type); + void receiveATC(SGGeod tx_pos, double freq, std::string text, int transmission_type); /*** TODO: receive multiplayer chat message and voice * @param: transmitter position, frequency, ATC text, flag to indicate whether the transmission comes from an ATC groundstation * @return: none ***/ - void receiveChat(SGGeod tx_pos, double freq, string text, int transmission_type); + void receiveChat(SGGeod tx_pos, double freq, std::string text, int transmission_type); /*** TODO: receive navaid * @param: transmitter position, frequency, flag @@ -139,5 +138,3 @@ public: ***/ double receiveBeacon(SGGeod &tx_pos, double heading, double pitch); }; - - diff --git a/src/Scenery/tilecache.hxx b/src/Scenery/tilecache.hxx index de127e659..410e8314a 100644 --- a/src/Scenery/tilecache.hxx +++ b/src/Scenery/tilecache.hxx @@ -21,20 +21,18 @@ // $Id$ -#ifndef _TILECACHE_HXX -#define _TILECACHE_HXX +#pragma once #include #include #include "tileentry.hxx" -using std::map; // A class to store and manage a pile of tiles class TileCache { public: - typedef map < long, TileEntry * > tile_map; + typedef std::map < long, TileEntry * > tile_map; typedef tile_map::iterator tile_map_iterator; typedef tile_map::const_iterator const_tile_map_iterator; private: @@ -129,5 +127,3 @@ public: // update tile's priority and expiry time according to current request void request_tile(TileEntry* t,float priority,bool current_view,double requesttime); }; - -#endif // _TILECACHE_HXX diff --git a/src/Sound/voice.hxx b/src/Sound/voice.hxx index ab96557ba..60b73644b 100644 --- a/src/Sound/voice.hxx +++ b/src/Sound/voice.hxx @@ -20,12 +20,7 @@ // // $Id$ -#ifndef _VOICE_HXX -#define _VOICE_HXX - -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include @@ -46,9 +41,6 @@ # include #endif // ENABLE_THREADS -using std::vector; - - class FGVoiceMgr : public SGSubsystem { @@ -124,5 +116,3 @@ protected: std::queue _msg; #endif }; - -#endif // _VOICE_HXX diff --git a/src/Systems/pitot.hxx b/src/Systems/pitot.hxx index fe5d7d833..22167dec3 100644 --- a/src/Systems/pitot.hxx +++ b/src/Systems/pitot.hxx @@ -5,8 +5,7 @@ // This file is in the Public Domain and comes with no warranty. -#ifndef __SYSTEMS_PITOT_HXX -#define __SYSTEMS_PITOT_HXX 1 +#pragma once #ifndef __cplusplus # error This library requires C++ @@ -15,7 +14,6 @@ #include #include -using std::string; #include #include @@ -65,5 +63,3 @@ private: SGPropertyNode_ptr _alpha_deg_node; SGPropertyNode_ptr _beta_deg_node; }; - -#endif // __SYSTEMS_PITOT_HXX diff --git a/utils/GPSsmooth/GPSsmooth.cxx b/utils/GPSsmooth/GPSsmooth.cxx index 03b16244f..3b09e4cb3 100644 --- a/utils/GPSsmooth/GPSsmooth.cxx +++ b/utils/GPSsmooth/GPSsmooth.cxx @@ -22,7 +22,7 @@ GPSTrack::~GPSTrack() {}; // load the specified file, return the number of records loaded -int GPSTrack::load( const string &file ) { +int GPSTrack::load( const std::string &file ) { int count = 0; data.clear(); @@ -34,7 +34,7 @@ int GPSTrack::load( const string &file ) { return 0; } - vector tokens; + std::vector tokens; GPSPoint p; while ( ! in.eof() ) { diff --git a/utils/GPSsmooth/GPSsmooth.hxx b/utils/GPSsmooth/GPSsmooth.hxx index 2795c92cb..a2148d18d 100644 --- a/utils/GPSsmooth/GPSsmooth.hxx +++ b/utils/GPSsmooth/GPSsmooth.hxx @@ -1,6 +1,4 @@ -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include @@ -8,11 +6,6 @@ #include #include -using std::cout; -using std::endl; -using std::string; -using std::vector; - // encapsulate a gps integer time (fixme, assumes all times in a track // are from the same day, so we don't handle midnight roll over) @@ -33,7 +26,7 @@ public: tmp -= mm * 100; double ss = tmp; seconds = hh*3600 + mm*60 + ss; - // cout << gpstime << " = " << seconds << endl; + // std::cout << gpstime << " = " << seconds << std::endl; } inline ~GPSTime() {} @@ -81,14 +74,14 @@ class GPSTrack { private: - vector data; + std::vector data; public: GPSTrack(); ~GPSTrack(); - int load( const string &file ); + int load( const std::string &file ); inline int size() const { return data.size(); } diff --git a/utils/GPSsmooth/MIDG-II.hxx b/utils/GPSsmooth/MIDG-II.hxx index 21ce58563..2b66e156f 100644 --- a/utils/GPSsmooth/MIDG-II.hxx +++ b/utils/GPSsmooth/MIDG-II.hxx @@ -1,10 +1,4 @@ -#ifndef _FG_MIDG_II_HXX -#define _FG_MIDG_II_HXX - - -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include @@ -16,11 +10,6 @@ #include #include -using std::cout; -using std::endl; -using std::string; -using std::vector; - // encapsulate a midg integer time (fixme, assumes all times in a track // are from the same day, so we don't handle midnight roll over) @@ -40,7 +29,7 @@ public: inline MIDGTime( const uint32_t midgtime_msec ) { msec = midgtime_msec; seconds = (double)midgtime_msec / 1000.0; - // cout << midgtime << " = " << seconds << endl; + // std::cout << midgtime << " = " << seconds << std::endl; } inline ~MIDGTime() {} @@ -118,8 +107,8 @@ class MIDGTrack { private: - vector pos_data; - vector att_data; + std::vector pos_data; + std::vector att_data; // parse message and put current data into vector if message has a // newer time stamp than existing data. @@ -138,7 +127,7 @@ public: MIDGpos *pos, MIDGatt *att ); // load the named file into internal buffers - bool load( const string &file ); + bool load( const std::string &file ); inline int pos_size() const { return pos_data.size(); } inline int att_size() const { return att_data.size(); } @@ -166,6 +155,3 @@ public: MIDGpos MIDGInterpPos( const MIDGpos A, const MIDGpos B, const double percent ); MIDGatt MIDGInterpAtt( const MIDGatt A, const MIDGatt B, const double percent ); - - -#endif // _FG_MIDG_II_HXX diff --git a/utils/GPSsmooth/UGear.hxx b/utils/GPSsmooth/UGear.hxx index ef35d0d18..134f180ed 100644 --- a/utils/GPSsmooth/UGear.hxx +++ b/utils/GPSsmooth/UGear.hxx @@ -1,10 +1,4 @@ -#ifndef _FG_UGEAR_II_HXX -#define _FG_UGEAR_II_HXX - - -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include @@ -16,11 +10,6 @@ #include #include -using std::cout; -using std::endl; -using std::string; -using std::vector; - enum ugPacketType { GPS_PACKET = 0, @@ -82,11 +71,11 @@ class UGTrack { private: - vector gps_data; - vector imu_data; - vector