From f89ad9baf0f72d613c755f4fb3704f57ff7ef973 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sun, 27 Nov 2011 13:48:04 +0100 Subject: [PATCH] Move some code from the header file to the source file. --- src/AIModel/AIBase.cxx | 11 +++++++++++ src/AIModel/AIBase.hxx | 12 ++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index 52eaea041..f202cfc15 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -894,6 +894,17 @@ int FGAIBase::_newAIModelID() { } +FGAIModelData::FGAIModelData(SGPropertyNode *root) + : _nasal( new FGNasalModelData(root) ), + _path("") +{ +} + +FGAIModelData::~FGAIModelData() +{ + delete _nasal; +} + void FGAIModelData::modelLoaded(const string& path, SGPropertyNode *prop, osg::Node *n) { const char* fxpath = prop->getStringValue("sound/path"); diff --git a/src/AIModel/AIBase.hxx b/src/AIModel/AIBase.hxx index 3a6e2e22d..f09a96e00 100644 --- a/src/AIModel/AIBase.hxx +++ b/src/AIModel/AIBase.hxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -33,8 +34,6 @@ #include - -#include #include
@@ -45,6 +44,7 @@ class SGMaterial; class FGAIManager; class FGAIFlightPlan; class FGFX; +class FGNasalModelData; class FGAIModelData; // defined below @@ -451,12 +451,8 @@ inline void FGAIBase::setMaxSpeed(double m) { class FGAIModelData : public simgear::SGModelData { public: - FGAIModelData(SGPropertyNode *root = 0) - : _nasal( new FGNasalModelData(root) ), - _path("") {}; - ~FGAIModelData() { - delete _nasal; - }; + FGAIModelData(SGPropertyNode *root = 0); + ~FGAIModelData(); void modelLoaded(const string& path, SGPropertyNode *prop, osg::Node *n); inline string& get_sound_path() { return _path; }; -- 2.39.5