]> git.mxchange.org Git - flightgear.git/commitdiff
Re-arranged include files to reduce external dependencies for a slight
authorcurt <curt>
Thu, 4 Apr 2002 06:05:51 +0000 (06:05 +0000)
committercurt <curt>
Thu, 4 Apr 2002 06:05:51 +0000 (06:05 +0000)
improvement in compilation speed.

src/Airports/runways.cxx
src/Airports/runways.hxx
src/Airports/simple.cxx
src/Airports/simple.hxx

index b768ea61b39a2dbaa0d60b6cb3fa712c72f9b1b0..23c7d68dddecfd6fc9562d982f6c5c5ea0fa881d 100644 (file)
 
 SG_USING_NAMESPACE(std);
 
+#ifndef _MSC_VER
+#define NDEBUG                 // MSVC needs this
+#endif // !_MSC_VER
+
+#include <mk4.h>
+#include <mk4str.h>
+
+#ifndef _MSC_VER
+#undef NDEBUG
+#endif // !_MSC_VER
+
+#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
 
-FGRunway::FGRunway() {
-}
+#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
+SG_USING_STD(istream);
+#endif
 
+inline istream&
+operator >> ( istream& in, FGRunway& a )
+{
+    int tmp;
 
-FGRunway::~FGRunway() {
+    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;
 }
 
 
index 041e904765ca367a37afa3b13d9097088fcc603a..a0ff3ec2694dec3eb0dd44a981800046a81946ad 100644 (file)
 
 #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 <vector>
 
-#ifndef _MSC_VER
-#define NDEBUG                 // she don't work without it.
-#endif // !_MSC_VER
-
-#include <mk4.h>
-#include <mk4str.h>
-
-#ifndef _MSC_VER
-#undef NDEBUG
-#endif // !_MSC_VER
+// Forward declarations.
+class c4_Storage;
+class c4_View;
 
 SG_USING_STD(string);
 SG_USING_STD(vector);
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-SG_USING_STD(istream);
-#endif
-
 
 class FGRunway {
 
@@ -87,22 +66,11 @@ 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 {
 
 private:
index 583e54e001551a9c8073358017b190ef305f3ceb..395fbcdb13c8e3be38f2b61ac8c010a7cb335153 100644 (file)
 //
 // $Id$
 
-
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #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/debug/logstream.hxx>
 
 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 ) {
     // open the specified database readonly
     storage = new c4_Storage( file.c_str(), false );
index 05d11101f1b0b762f88793b6d14b60fa332c3158..288586417fc38943862b132bf1ced9e3edf567b2 100644 (file)
 
 #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 <set>
 
-#ifndef _MSC_VER
-#   define NDEBUG                      // she don't work without it.
-#endif
-#include <mk4.h>
-#include <mk4str.h>
-#ifndef _MSC_VER
-#  undef NDEBUG
-#endif
+// Forward declarations.
+class c4_Storage;
+class c4_View;
 
 SG_USING_STD(string);
 SG_USING_STD(set);
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-SG_USING_STD(istream);
-#endif
-
-
 class FGAirport {
 
 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 {