1
0
Fork 0

James Turner:

* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
This commit is contained in:
ehofman 2008-07-29 08:27:48 +00:00
parent 5cceb32c0a
commit 429f2530de
31 changed files with 68 additions and 78 deletions

View file

@ -24,8 +24,8 @@
# include "config.h" # include "config.h"
#endif #endif
#include <stdio.h> #include <cstdio>
#include <string.h> // strdup #include <cstring> // strdup
#include <plib/ul.h> #include <plib/ul.h>
@ -36,6 +36,7 @@
#include <simgear/structure/exception.hxx> #include <simgear/structure/exception.hxx>
#include <Main/globals.hxx> #include <Main/globals.hxx>
#include <Main/fg_init.hxx>
#include <Main/fg_props.hxx> #include <Main/fg_props.hxx>
#include <Main/viewmgr.hxx> #include <Main/viewmgr.hxx>
#include <Cockpit/panel.hxx> #include <Cockpit/panel.hxx>

View file

@ -26,17 +26,9 @@
#ifndef _AIRCRAFT_HXX #ifndef _AIRCRAFT_HXX
#define _AIRCRAFT_HXX #define _AIRCRAFT_HXX
class FGInterface;
#ifndef __cplusplus class FGControls;
# error This library requires C++ class SGPropertyNode;
#endif
#include <FDM/flight.hxx>
#include <Main/fg_init.hxx>
#include "controls.hxx"
// Define a structure containing all the parameters for an aircraft // Define a structure containing all the parameters for an aircraft
typedef struct{ typedef struct{

View file

@ -20,6 +20,9 @@
// //
// $Id$ // $Id$
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>

View file

@ -24,16 +24,8 @@
#ifndef _CONTROLS_HXX #ifndef _CONTROLS_HXX
#define _CONTROLS_HXX #define _CONTROLS_HXX
#include <simgear/props/props.hxx>
#include <simgear/structure/subsystem_mgr.hxx> #include <simgear/structure/subsystem_mgr.hxx>
#include <Main/globals.hxx>
#ifndef __cplusplus
# error This library requires C++
#endif
// Define a structure containing the control parameters // Define a structure containing the control parameters
class FGControls : public SGSubsystem class FGControls : public SGSubsystem

View file

@ -31,6 +31,7 @@
#include <Main/main.hxx> #include <Main/main.hxx>
#include <Main/fg_props.hxx> #include <Main/fg_props.hxx>
#include <Aircraft/aircraft.hxx> #include <Aircraft/aircraft.hxx>
#include <FDM/flight.hxx>
#include "environment.hxx" #include "environment.hxx"
#include "environment_ctrl.hxx" #include "environment_ctrl.hxx"

View file

@ -50,12 +50,13 @@ HISTORY
#include <simgear/math/sg_geodesy.hxx> #include <simgear/math/sg_geodesy.hxx>
#include <simgear/misc/sg_path.hxx> #include <simgear/misc/sg_path.hxx>
#include <Aircraft/aircraft.hxx>
#include <Main/globals.hxx> #include <Main/globals.hxx>
#include <Main/fg_props.hxx> #include <Main/fg_props.hxx>
#include <Aircraft/controls.hxx>
#include "Balloon.h" #include "Balloon.h"
/****************************************************************************/ /****************************************************************************/
/********************************** CODE ************************************/ /********************************** CODE ************************************/
/****************************************************************************/ /****************************************************************************/

View file

@ -42,7 +42,6 @@ HISTORY
/* INCLUDES */ /* INCLUDES */
/****************************************************************************/ /****************************************************************************/
#include <Aircraft/aircraft.hxx>
#include <FDM/flight.hxx> #include <FDM/flight.hxx>
#include "BalloonSim.h" #include "BalloonSim.h"

View file

@ -72,11 +72,6 @@
#include "uiuc_gear.h" #include "uiuc_gear.h"
using std::cerr;
#define HEIGHT_AGL_WHEEL d_wheel_rwy_local_v[2] #define HEIGHT_AGL_WHEEL d_wheel_rwy_local_v[2]

View file

@ -78,11 +78,11 @@ Prints to screen the follow:
#include "uiuc_warnings_errors.h" #include "uiuc_warnings_errors.h"
SG_USING_STD (cerr); using std::cerr;
SG_USING_STD (endl); using std::endl;
#ifndef _MSC_VER #ifndef _MSC_VER
SG_USING_STD (exit); using std::exit;
#endif #endif
void uiuc_warnings_errors(int errorCode, std::string line) void uiuc_warnings_errors(int errorCode, std::string line)

View file

@ -82,6 +82,8 @@
# include <config.h> # include <config.h>
#endif #endif
#include <iostream>
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <simgear/misc/sg_path.hxx> #include <simgear/misc/sg_path.hxx>
#include <Aircraft/aircraft.hxx> #include <Aircraft/aircraft.hxx>
@ -102,9 +104,6 @@
//#include "uiuc_network.h" //#include "uiuc_network.h"
#include "uiuc_get_flapper.h" #include "uiuc_get_flapper.h"
using std::cout;
using std::endl;
extern "C" void uiuc_initial_init (); extern "C" void uiuc_initial_init ();
extern "C" void uiuc_defaults_inits (); extern "C" void uiuc_defaults_inits ();
extern "C" void uiuc_vel_init (); extern "C" void uiuc_vel_init ();
@ -323,7 +322,7 @@ void uiuc_init_aeromodel ()
SGPath path(globals->get_fg_root()); SGPath path(globals->get_fg_root());
path.append(fgGetString("/sim/aircraft-dir")); path.append(fgGetString("/sim/aircraft-dir"));
path.append("aircraft.dat"); path.append("aircraft.dat");
cout << "We are using "<< path.str() << endl; std::cout << "We are using "<< path.str() << std::endl;
uiuc_initializemaps(); // Initialize the <string,int> maps uiuc_initializemaps(); // Initialize the <string,int> maps
uiuc_menu(path.str()); // Read the specified aircraft file uiuc_menu(path.str()); // Read the specified aircraft file
} }

View file

@ -31,6 +31,8 @@
#include <Main/globals.hxx> #include <Main/globals.hxx>
#include <Scenery/scenery.hxx> #include <Scenery/scenery.hxx>
#include <Aircraft/aircraft.hxx> #include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <FDM/flight.hxx>
#include <Environment/environment.hxx> #include <Environment/environment.hxx>
#include <Environment/environment_mgr.hxx> #include <Environment/environment_mgr.hxx>
#include <Main/viewer.hxx> #include <Main/viewer.hxx>

View file

@ -33,6 +33,7 @@
#include <simgear/sg_inlines.h> #include <simgear/sg_inlines.h>
#include <simgear/math/sg_random.h> #include <simgear/math/sg_random.h>
#include <simgear/math/vector.hxx> #include <simgear/math/vector.hxx>
#include <simgear/structure/exception.hxx>
#include <Aircraft/aircraft.hxx> #include <Aircraft/aircraft.hxx>
#include <Navaids/navlist.hxx> #include <Navaids/navlist.hxx>

View file

@ -62,6 +62,7 @@
#include <simgear/timing/lowleveltime.h> #include <simgear/timing/lowleveltime.h>
#include <Aircraft/aircraft.hxx> #include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <Aircraft/replay.hxx> #include <Aircraft/replay.hxx>
#include <Airports/apt_loader.hxx> #include <Airports/apt_loader.hxx>
#include <Airports/runways.hxx> #include <Airports/runways.hxx>

View file

@ -36,6 +36,8 @@
#include <iostream> #include <iostream>
#include <Aircraft/aircraft.hxx> #include <Aircraft/aircraft.hxx>
#include <FDM/flight.hxx>
#include <Time/tmp.hxx> #include <Time/tmp.hxx>
#include <Environment/environment.hxx> #include <Environment/environment.hxx>

View file

@ -36,8 +36,8 @@
#include <vector> #include <vector>
#include <string> #include <string>
SG_USING_STD( vector ); using std::vector;
SG_USING_STD( string ); using std::string;
typedef vector<string> string_list; typedef vector<string> string_list;

View file

@ -73,7 +73,7 @@
#include "splash.hxx" #include "splash.hxx"
#include "main.hxx" #include "main.hxx"
#include "util.hxx" #include "util.hxx"
#include "fg_init.hxx"
static double real_delta_time_sec = 0.0; static double real_delta_time_sec = 0.0;
double delta_time_sec = 0.0; double delta_time_sec = 0.0;

View file

@ -37,7 +37,7 @@
#include "navrecord.hxx" #include "navrecord.hxx"
#include "navdb.hxx" #include "navdb.hxx"
SG_USING_STD( string ); using std::string;
// load and initialize the navigational databases // load and initialize the navigational databases

View file

@ -27,7 +27,8 @@
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
#include <simgear/io/iochannel.hxx> #include <simgear/io/iochannel.hxx>
#include <Aircraft/aircraft.hxx> #include <Aircraft/controls.hxx>
#include <Main/globals.hxx>
#include "joyclient.hxx" #include "joyclient.hxx"

View file

@ -57,7 +57,7 @@
#include "SchedFlight.hxx" #include "SchedFlight.hxx"
#include "TrafficMgr.hxx" #include "TrafficMgr.hxx"
SG_USING_STD( sort ); using std::sort;
/****************************************************************************** /******************************************************************************
* the FGAISchedule class contains data members and code to maintain a * the FGAISchedule class contains data members and code to maintain a

View file

@ -13,8 +13,8 @@
#include <simgear/constants.h> #include <simgear/constants.h>
#include <simgear/math/sg_geodesy.hxx> #include <simgear/math/sg_geodesy.hxx>
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
int main() { int main() {
// for each lat/lon given in goedetic coordinates, calculate // for each lat/lon given in goedetic coordinates, calculate

View file

@ -13,8 +13,8 @@
#include "MIDG-II.hxx" #include "MIDG-II.hxx"
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
MIDGTrack::MIDGTrack() {}; MIDGTrack::MIDGTrack() {};

View file

@ -16,10 +16,10 @@
#include <simgear/io/iochannel.hxx> #include <simgear/io/iochannel.hxx>
#include <simgear/serial/serial.hxx> #include <simgear/serial/serial.hxx>
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
SG_USING_STD(vector); using std::vector;
// encapsulate a midg integer time (fixme, assumes all times in a track // encapsulate a midg integer time (fixme, assumes all times in a track

View file

@ -21,9 +21,9 @@
#include "MIDG-II.hxx" #include "MIDG-II.hxx"
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
// Network channels // Network channels

View file

@ -14,8 +14,8 @@
#include "UGear.hxx" #include "UGear.hxx"
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
#define START_OF_MSG0 147 #define START_OF_MSG0 147

View file

@ -16,10 +16,10 @@
#include <simgear/io/iochannel.hxx> #include <simgear/io/iochannel.hxx>
#include <simgear/serial/serial.hxx> #include <simgear/serial/serial.hxx>
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
SG_USING_STD(vector); using std::vector;
enum ugPacketType { enum ugPacketType {

View file

@ -16,10 +16,10 @@
#include <simgear/io/iochannel.hxx> #include <simgear/io/iochannel.hxx>
#include <simgear/serial/serial.hxx> #include <simgear/serial/serial.hxx>
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
SG_USING_STD(queue); using std::queue;
// Manage UGear Command Channel // Manage UGear Command Channel

View file

@ -29,9 +29,9 @@
#include "UGear_telnet.hxx" #include "UGear_telnet.hxx"
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
// Network channels // Network channels

View file

@ -10,8 +10,8 @@
#include "gps.hxx" #include "gps.hxx"
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
GPSTrack::GPSTrack() {}; GPSTrack::GPSTrack() {};

View file

@ -8,10 +8,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
SG_USING_STD(vector); using std::vector;
// encapsulate a gps integer time (fixme, assumes all times in a track // encapsulate a gps integer time (fixme, assumes all times in a track

View file

@ -17,9 +17,9 @@
#include "gps.hxx" #include "gps.hxx"
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
SG_USING_STD(string); using std::string;
// Network channels // Network channels

View file

@ -41,9 +41,9 @@
#include <simgear/bucket/newbucket.hxx> #include <simgear/bucket/newbucket.hxx>
SG_USING_STD(string); using std::string;
SG_USING_STD(cout); using std::cout;
SG_USING_STD(endl); using std::endl;
static string server = "scenery.flightgear.org"; static string server = "scenery.flightgear.org";
static string source_module = "Scenery"; static string source_module = "Scenery";