From 0fc7aa8cc096e59b9366df60c1fdbd0803ac4481 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 11 May 2018 08:58:30 +0100 Subject: [PATCH] Moved the Options constructors and destructor implementaions into the cpp to make it easier to do debugging --- include/osgDB/Options | 19 ++++--------------- src/osgDB/Options.cpp | 29 ++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/include/osgDB/Options b/include/osgDB/Options index 0790161de..b9ef3eebc 100644 --- a/include/osgDB/Options +++ b/include/osgDB/Options @@ -95,21 +95,9 @@ class OSGDB_EXPORT Options : public osg::Object }; - Options(): - osg::Object(true), - _objectCacheHint(CACHE_ARCHIVES), - _precisionHint(FLOAT_PRECISION_ALL), - _buildKdTreesHint(NO_PREFERENCE) {} + Options(); - Options(const std::string& str): - osg::Object(true), - _str(str), - _objectCacheHint(CACHE_ARCHIVES), - _precisionHint(FLOAT_PRECISION_ALL), - _buildKdTreesHint(NO_PREFERENCE) - { - parsePluginStringData(str); - } + Options(const std::string& str); Options(const Options& options,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); @@ -257,10 +245,11 @@ class OSGDB_EXPORT Options : public osg::Object bool operator < (const Options &rhs) const; bool operator == (const Options &rhs) const; - virtual ~Options() {} protected: + virtual ~Options(); + std::string _str; FilePathList _databasePaths; diff --git a/src/osgDB/Options.cpp b/src/osgDB/Options.cpp index 1841fcaf2..2b5890853 100644 --- a/src/osgDB/Options.cpp +++ b/src/osgDB/Options.cpp @@ -16,6 +16,26 @@ using namespace osgDB; + +Options::Options(): + osg::Object(true), + _objectCacheHint(CACHE_ARCHIVES), + _precisionHint(FLOAT_PRECISION_ALL), + _buildKdTreesHint(NO_PREFERENCE) +{ +} + +Options::Options(const std::string& str): + osg::Object(true), + _str(str), + _objectCacheHint(CACHE_ARCHIVES), + _precisionHint(FLOAT_PRECISION_ALL), + _buildKdTreesHint(NO_PREFERENCE) +{ + parsePluginStringData(str); +} + + Options::Options(const Options& options,const osg::CopyOp& copyop): osg::Object(options,copyop), _str(options._str), @@ -32,7 +52,14 @@ Options::Options(const Options& options,const osg::CopyOp& copyop): _fileLocationCallback(options._fileLocationCallback), _fileCache(options._fileCache), _terrain(options._terrain), - _parentGroup(options._parentGroup) {} + _parentGroup(options._parentGroup) +{ +} + +Options::~Options() +{ + abort(); +} void Options::parsePluginStringData(const std::string& str, char separator1, char separator2) {