From: mfranz <mfranz>
Date: Mon, 17 Apr 2006 11:29:01 +0000 (+0000)
Subject: make headers include headers they depend on, don't rely on the c(xx)
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=efac53b1212d3dd3456b7cada4262287c700ce34;p=simgear.git

make headers include headers they depend on, don't rely on the c(xx)
file to do that. (This is a requirement for header precompiling.)
---

diff --git a/simgear/environment/visual_enviro.cxx b/simgear/environment/visual_enviro.cxx
index d3888f5c..1f8d3acf 100644
--- a/simgear/environment/visual_enviro.cxx
+++ b/simgear/environment/visual_enviro.cxx
@@ -23,7 +23,6 @@
 #  include <simgear_config.h>
 #endif
 
-#include <plib/sg.h>
 #include <simgear/constants.h>
 #include <simgear/structure/SGReferenced.hxx>
 #include <simgear/structure/SGSharedPtr.hxx>
diff --git a/simgear/environment/visual_enviro.hxx b/simgear/environment/visual_enviro.hxx
index 1c901b09..e51bd4d6 100644
--- a/simgear/environment/visual_enviro.hxx
+++ b/simgear/environment/visual_enviro.hxx
@@ -22,6 +22,8 @@
 #ifndef _VISUAL_ENVIRO_HXX
 #define _VISUAL_ENVIRO_HXX
 
+#include <plib/sg.h>
+
 #include <simgear/compiler.h>
 #include STL_STRING
 #include <vector>
diff --git a/simgear/scene/model/animation.hxx b/simgear/scene/model/animation.hxx
index c4ab3d9e..118f74ef 100644
--- a/simgear/scene/model/animation.hxx
+++ b/simgear/scene/model/animation.hxx
@@ -14,9 +14,6 @@
 #include <vector>
 #include <map>
 
-SG_USING_STD(vector);
-SG_USING_STD(map);
-
 #include <plib/sg.h>
 #include <plib/ssg.h>
 
@@ -24,6 +21,9 @@ SG_USING_STD(map);
 #include <simgear/props/props.hxx>
 #include <simgear/misc/sg_path.hxx>
 
+SG_USING_STD(vector);
+SG_USING_STD(map);
+
 
 // Don't pull in the headers, since we don't need them here.
 class SGInterpTable;
diff --git a/simgear/scene/model/custtrans.cxx b/simgear/scene/model/custtrans.cxx
index c34dc02c..b8857013 100755
--- a/simgear/scene/model/custtrans.cxx
+++ b/simgear/scene/model/custtrans.cxx
@@ -2,7 +2,6 @@
      $Id$
 */
 
-#include "plib/ssg.h"
 #include "custtrans.hxx"
 void _ssgPushMatrix ( sgMat4 m );
 void _ssgPopMatrix  ();
diff --git a/simgear/scene/model/custtrans.hxx b/simgear/scene/model/custtrans.hxx
index 2b0da4a5..50df8985 100755
--- a/simgear/scene/model/custtrans.hxx
+++ b/simgear/scene/model/custtrans.hxx
@@ -5,6 +5,8 @@
 #ifndef _SG_CUSTOM_TRANSFORM_HXX
 #define _SG_CUSTOM_TRANSFORM_HXX 1
 
+#include "plib/ssg.h"
+
 class SGCustomTransform : public ssgBranch
 {
 public:
diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx
index 8021b302..6d42025d 100644
--- a/simgear/scene/model/model.cxx
+++ b/simgear/scene/model/model.cxx
@@ -7,8 +7,6 @@
 #include <simgear_config.h>
 #endif
 
-#include <simgear/compiler.h>
-
 #include <string.h>             // for strcmp()
 
 #include <vector>
diff --git a/simgear/scene/model/model.hxx b/simgear/scene/model/model.hxx
index 2f8648e2..5d64a5d8 100644
--- a/simgear/scene/model/model.hxx
+++ b/simgear/scene/model/model.hxx
@@ -10,6 +10,8 @@
 # error This library requires C++
 #endif
 
+#include <simgear/compiler.h>
+
 #include <vector>
 #include <set>
 
diff --git a/simgear/scene/model/personality.cxx b/simgear/scene/model/personality.cxx
index 622137e8..a1374165 100755
--- a/simgear/scene/model/personality.cxx
+++ b/simgear/scene/model/personality.cxx
@@ -2,8 +2,6 @@
  * $Id$
  */
 
-#include <simgear/compiler.h>
-
 #include "personality.hxx"
 
 void SGPersonalityBranch::setDoubleValue( double value, SGAnimation *anim, int var_id, int var_num )
diff --git a/simgear/scene/model/personality.hxx b/simgear/scene/model/personality.hxx
index 468d1e9c..e5392b2d 100755
--- a/simgear/scene/model/personality.hxx
+++ b/simgear/scene/model/personality.hxx
@@ -5,12 +5,13 @@
 #ifndef _SG_PERSONALITY_HXX
 #define _SG_PERSONALITY_HXX 1
 
+#include <simgear/compiler.h>
+#include <plib/ssg.h>
+
 #include <map>
 
 SG_USING_STD(map);
 
-#include <plib/ssg.h>
-
 class SGAnimation;
 
 class SGPersonalityBranch : public ssgBranch {
diff --git a/simgear/scene/model/shadowvolume.cxx b/simgear/scene/model/shadowvolume.cxx
index cd32bf5d..970fe3e7 100644
--- a/simgear/scene/model/shadowvolume.cxx
+++ b/simgear/scene/model/shadowvolume.cxx
@@ -25,8 +25,6 @@
 #endif
 
 #include <plib/sg.h>
-#include <plib/ssg.h>
-#include <simgear/props/props.hxx>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/screen/extensions.hxx>
 #include <simgear/scene/model/animation.hxx>
diff --git a/simgear/scene/model/shadowvolume.hxx b/simgear/scene/model/shadowvolume.hxx
index ee4b31af..2a46cecc 100644
--- a/simgear/scene/model/shadowvolume.hxx
+++ b/simgear/scene/model/shadowvolume.hxx
@@ -23,9 +23,13 @@
 #ifndef _SHADOWVOLUME_HXX
 #define _SHADOWVOLUME_HXX
 
+#include <simgear/compiler.h>
 #include <simgear/structure/ssgSharedPtr.hxx>
+#include <simgear/props/props.hxx>
 
+#include <plib/ssg.h>
 #include <plib/sg.h>
+
 #include <vector>
 #include <map>
 
diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx
index 309b63dd..99290281 100644
--- a/simgear/scene/sky/cloud.cxx
+++ b/simgear/scene/sky/cloud.cxx
@@ -36,7 +36,6 @@
 #include <simgear/math/polar3d.hxx>
 #include <simgear/math/sg_random.h>
 #include <simgear/debug/logstream.hxx>
-#include <simgear/misc/sg_path.hxx>
 #include <simgear/screen/extensions.hxx>
 #include <simgear/screen/texture.hxx>
 #include <simgear/structure/ssgSharedPtr.hxx>
diff --git a/simgear/scene/sky/cloud.hxx b/simgear/scene/sky/cloud.hxx
index f6ed4d5a..4baa0d58 100644
--- a/simgear/scene/sky/cloud.hxx
+++ b/simgear/scene/sky/cloud.hxx
@@ -28,6 +28,7 @@
 #define _SG_CLOUD_HXX_
 
 #include <simgear/compiler.h>
+#include <simgear/misc/sg_path.hxx>
 
 #include <plib/ssg.h>
 
diff --git a/simgear/scene/tgdb/pt_lights.cxx b/simgear/scene/tgdb/pt_lights.cxx
index 3d2234bf..76a89d71 100644
--- a/simgear/scene/tgdb/pt_lights.cxx
+++ b/simgear/scene/tgdb/pt_lights.cxx
@@ -27,7 +27,6 @@
 #include <plib/sg.h>
 
 #include <simgear/scene/material/mat.hxx>
-#include <simgear/scene/material/matlib.hxx>
 
 #include "vasi.hxx"
 
diff --git a/simgear/scene/tgdb/pt_lights.hxx b/simgear/scene/tgdb/pt_lights.hxx
index b8e8318a..7e5aa5ed 100644
--- a/simgear/scene/tgdb/pt_lights.hxx
+++ b/simgear/scene/tgdb/pt_lights.hxx
@@ -39,6 +39,7 @@
 #include <plib/ssg.h>		// plib include
 
 #include <simgear/math/sg_types.hxx>
+#include <simgear/scene/material/matlib.hxx>
 
 SG_USING_STD(string);
 SG_USING_STD(vector);
diff --git a/simgear/screen/GLBitmaps.cxx b/simgear/screen/GLBitmaps.cxx
index a490a4d0..05f61553 100755
--- a/simgear/screen/GLBitmaps.cxx
+++ b/simgear/screen/GLBitmaps.cxx
@@ -15,10 +15,6 @@
 #include <limits.h>
 #include <string.h>		// memcpy()
 
-#include <simgear/compiler.h>
-
-#include SG_GL_H
-
 #include "GLBitmaps.h"
 
 GlBitmap::GlBitmap( GLenum mode, GLint width, GLint height, GLubyte *bitmap )
diff --git a/simgear/screen/GLBitmaps.h b/simgear/screen/GLBitmaps.h
index dc346bd6..f6fb05f4 100644
--- a/simgear/screen/GLBitmaps.h
+++ b/simgear/screen/GLBitmaps.h
@@ -1,3 +1,7 @@
+#include <simgear/compiler.h>
+
+#include SG_GL_H
+
 class GlBitmap
 {
 public:
diff --git a/simgear/screen/jpgfactory.cxx b/simgear/screen/jpgfactory.cxx
index 26a82014..49621fe5 100644
--- a/simgear/screen/jpgfactory.cxx
+++ b/simgear/screen/jpgfactory.cxx
@@ -25,9 +25,6 @@
 #  include <windows.h>
 #endif
 
-#include <stdlib.h>
-#include <stdio.h>
-
 #include <plib/ssg.h>
 
 #include "jpgfactory.hxx"
diff --git a/simgear/screen/jpgfactory.hxx b/simgear/screen/jpgfactory.hxx
index 9ad0a74d..abc03186 100644
--- a/simgear/screen/jpgfactory.hxx
+++ b/simgear/screen/jpgfactory.hxx
@@ -27,6 +27,8 @@
 extern "C" {
 #endif
 
+#include <stdlib.h>
+#include <stdio.h>
 #include <jpeglib.h>
 #include <jerror.h>
 
diff --git a/simgear/screen/ssgEntityArray.cxx b/simgear/screen/ssgEntityArray.cxx
index 88297806..bf1c12da 100644
--- a/simgear/screen/ssgEntityArray.cxx
+++ b/simgear/screen/ssgEntityArray.cxx
@@ -22,7 +22,7 @@
 */
 
 #ifdef HAVE_CONFIG_H
-#  include <config.h>
+#  include <simgear_config.h>
 #endif
 
 #include "ssgEntityArray.hxx"
diff --git a/simgear/screen/ssgEntityArray.hxx b/simgear/screen/ssgEntityArray.hxx
index 659d6d6c..3b0c65cc 100644
--- a/simgear/screen/ssgEntityArray.hxx
+++ b/simgear/screen/ssgEntityArray.hxx
@@ -2,7 +2,7 @@
 #define _SSG_ENTITY_ARRAY_HXX
 
 #ifdef HAVE_CONFIG_H
-#  include <config.h>
+#  include <simgear_config.h>
 #endif
 
 #include <plib/ssg.h>