Re-arranged include files to reduce external dependencies for a slight
improvement in compilation speed.
This commit is contained in:
parent
fd8d48d011
commit
6a399b24a3
4 changed files with 68 additions and 79 deletions
|
@ -41,12 +41,39 @@
|
||||||
|
|
||||||
SG_USING_NAMESPACE(std);
|
SG_USING_NAMESPACE(std);
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define NDEBUG // MSVC needs this
|
||||||
|
#endif // !_MSC_VER
|
||||||
|
|
||||||
FGRunway::FGRunway() {
|
#include <mk4.h>
|
||||||
}
|
#include <mk4str.h>
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#undef NDEBUG
|
||||||
|
#endif // !_MSC_VER
|
||||||
|
|
||||||
FGRunway::~FGRunway() {
|
#ifdef SG_HAVE_STD_INCLUDES
|
||||||
|
# include <istream>
|
||||||
|
#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
|
# include <iostream.h>
|
||||||
|
#elif defined( __BORLANDC__ )
|
||||||
|
# include <iostream>
|
||||||
|
#else
|
||||||
|
# include <istream.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
|
SG_USING_STD(istream);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
inline istream&
|
||||||
|
operator >> ( istream& in, FGRunway& a )
|
||||||
|
{
|
||||||
|
int tmp;
|
||||||
|
|
||||||
|
return in >> a.rwy_no >> a.lat >> a.lon >> a.heading >> a.length >> a.width
|
||||||
|
>> a.surface_flags >> a.end1_flags >> tmp >> tmp >> a.end2_flags
|
||||||
|
>> tmp >> tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,37 +36,16 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <istream>
|
|
||||||
#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
|
||||||
# include <iostream.h>
|
|
||||||
#elif defined( __BORLANDC__ )
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
// Forward declarations.
|
||||||
#define NDEBUG // she don't work without it.
|
class c4_Storage;
|
||||||
#endif // !_MSC_VER
|
class c4_View;
|
||||||
|
|
||||||
#include <mk4.h>
|
|
||||||
#include <mk4str.h>
|
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#undef NDEBUG
|
|
||||||
#endif // !_MSC_VER
|
|
||||||
|
|
||||||
SG_USING_STD(string);
|
SG_USING_STD(string);
|
||||||
SG_USING_STD(vector);
|
SG_USING_STD(vector);
|
||||||
|
|
||||||
#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
|
||||||
SG_USING_STD(istream);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
class FGRunway {
|
class FGRunway {
|
||||||
|
|
||||||
|
@ -87,22 +66,11 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FGRunway();
|
FGRunway() {}
|
||||||
~FGRunway();
|
~FGRunway() {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline istream&
|
|
||||||
operator >> ( istream& in, FGRunway& a )
|
|
||||||
{
|
|
||||||
int tmp;
|
|
||||||
|
|
||||||
return in >> a.rwy_no >> a.lat >> a.lon >> a.heading >> a.length >> a.width
|
|
||||||
>> a.surface_flags >> a.end1_flags >> tmp >> tmp >> a.end2_flags
|
|
||||||
>> tmp >> tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class FGRunways {
|
class FGRunways {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -23,20 +23,10 @@
|
||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #include <sys/types.h> // for gdbm open flags
|
|
||||||
// #include <sys/stat.h> // for gdbm open flags
|
|
||||||
|
|
||||||
// #ifdef HAVE_GDBM
|
|
||||||
// # include <gdbm.h>
|
|
||||||
// #else
|
|
||||||
// # include <simgear/gdbm/gdbm.h>
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
|
@ -50,6 +40,36 @@
|
||||||
|
|
||||||
SG_USING_NAMESPACE(std);
|
SG_USING_NAMESPACE(std);
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
# define NDEBUG // she don't work without it.
|
||||||
|
#endif
|
||||||
|
#include <mk4.h>
|
||||||
|
#include <mk4str.h>
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
# undef NDEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SG_HAVE_STD_INCLUDES
|
||||||
|
# include <istream>
|
||||||
|
#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
|
# include <iostream.h>
|
||||||
|
#elif defined( __BORLANDC__ )
|
||||||
|
# include <iostream>
|
||||||
|
#else
|
||||||
|
# include <istream.h>
|
||||||
|
#endif
|
||||||
|
#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
|
SG_USING_STD(istream);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
inline istream&
|
||||||
|
operator >> ( istream& in, FGAirport& a )
|
||||||
|
{
|
||||||
|
return in >> a.id >> a.latitude >> a.longitude >> a.elevation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FGAirports::FGAirports( const string& file ) {
|
FGAirports::FGAirports( const string& file ) {
|
||||||
// open the specified database readonly
|
// open the specified database readonly
|
||||||
storage = new c4_Storage( file.c_str(), false );
|
storage = new c4_Storage( file.c_str(), false );
|
||||||
|
|
|
@ -38,36 +38,16 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
|
||||||
# include <istream>
|
|
||||||
#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
|
||||||
# include <iostream.h>
|
|
||||||
#elif defined( __BORLANDC__ )
|
|
||||||
# include <iostream>
|
|
||||||
#else
|
|
||||||
# include <istream.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
// Forward declarations.
|
||||||
# define NDEBUG // she don't work without it.
|
class c4_Storage;
|
||||||
#endif
|
class c4_View;
|
||||||
#include <mk4.h>
|
|
||||||
#include <mk4str.h>
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
# undef NDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SG_USING_STD(string);
|
SG_USING_STD(string);
|
||||||
SG_USING_STD(set);
|
SG_USING_STD(set);
|
||||||
|
|
||||||
#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
|
||||||
SG_USING_STD(istream);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
class FGAirport {
|
class FGAirport {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -91,12 +71,6 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline istream&
|
|
||||||
operator >> ( istream& in, FGAirport& a )
|
|
||||||
{
|
|
||||||
return in >> a.id >> a.latitude >> a.longitude >> a.elevation;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class FGAirports {
|
class FGAirports {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue