diff --git a/src/Main/fg_props.hxx b/src/Main/fg_props.hxx index 8516c93c9..41772ff35 100644 --- a/src/Main/fg_props.hxx +++ b/src/Main/fg_props.hxx @@ -12,7 +12,7 @@ #include #include
- + //////////////////////////////////////////////////////////////////////// // Property management. //////////////////////////////////////////////////////////////////////// diff --git a/src/Main/viewer.hxx b/src/Main/viewer.hxx index 50d567439..965e8569a 100644 --- a/src/Main/viewer.hxx +++ b/src/Main/viewer.hxx @@ -25,12 +25,7 @@ #ifndef _VIEWER_HXX -#define _VIEWER_HXX - - -#ifndef __cplusplus -# error This library requires C++ -#endif +#define _VIEWER_HXX namespace flightgear { diff --git a/src/Main/viewmgr.cxx b/src/Main/viewmgr.cxx index 950eace83..fd6f25fd9 100644 --- a/src/Main/viewmgr.cxx +++ b/src/Main/viewmgr.cxx @@ -25,14 +25,14 @@ # include "config.h" #endif +#include "viewmgr.hxx" + #include // strcmp #include - #include - -#include "viewmgr.hxx" - +#include
+#include
// Constructor FGViewMgr::FGViewMgr( void ) : @@ -341,7 +341,13 @@ FGViewMgr::copyToCurrent() get_current_view()->getInternal()); } - +void +FGViewMgr::add_view( FGViewer * v ) +{ + views.push_back(v); + v->init(); +} + double FGViewMgr::getViewHeadingOffset_deg () const { diff --git a/src/Main/viewmgr.hxx b/src/Main/viewmgr.hxx index ea4470fbb..8053a1a9d 100644 --- a/src/Main/viewmgr.hxx +++ b/src/Main/viewmgr.hxx @@ -28,16 +28,13 @@ #include #include +#include -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "fg_props.hxx" -#include "viewer.hxx" - -using std::vector; +#include
// FIXME - remove inlines here. +// forward decls +class FGViewer; +typedef SGSharedPtr FGViewerPtr; // Define a structure containing view information class FGViewMgr : public SGSubsystem @@ -98,10 +95,8 @@ public: // setters inline void clear() { views.clear(); } inline void set_view( const int v ) { current = v; } - inline void add_view( FGViewer * v ) { - views.push_back(v); - v->init(); - } + void add_view( FGViewer * v ); + // copies current offset settings to current-view path... void copyToCurrent (); @@ -150,7 +145,7 @@ private: SGPropertyNode_ptr view_number; vector config_list; - typedef vector > viewer_list; + typedef std::vector viewer_list; viewer_list views; SGVec3d abs_viewer_position;