From: timoore Date: Sat, 19 Jul 2008 16:00:58 +0000 (+0000) Subject: Eliminate empty default constructor for SGReaderWriterBTGOptions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1729841083e26d6e14da219355c476b8f173be0c;p=simgear.git Eliminate empty default constructor for SGReaderWriterBTGOptions --- diff --git a/simgear/scene/tgdb/SGReaderWriterBTG.cxx b/simgear/scene/tgdb/SGReaderWriterBTG.cxx index 9c35ce6a..1ab674fd 100644 --- a/simgear/scene/tgdb/SGReaderWriterBTG.cxx +++ b/simgear/scene/tgdb/SGReaderWriterBTG.cxx @@ -26,6 +26,11 @@ using namespace simgear; +// SGReaderWriterBTGOptions static value here to avoid an additional, +// tiny source file. + +std::string SGReaderWriterBTGOptions::defaultOptions; + const char* SGReaderWriterBTG::className() const { return "BTG Database reader"; diff --git a/simgear/scene/tgdb/SGReaderWriterBTGOptions.hxx b/simgear/scene/tgdb/SGReaderWriterBTGOptions.hxx index ed612325..95892178 100644 --- a/simgear/scene/tgdb/SGReaderWriterBTGOptions.hxx +++ b/simgear/scene/tgdb/SGReaderWriterBTGOptions.hxx @@ -21,10 +21,9 @@ #include class SGReaderWriterBTGOptions : public osgDB::ReaderWriter::Options { public: - SGReaderWriterBTGOptions() {} - SGReaderWriterBTGOptions(const std::string& str): + SGReaderWriterBTGOptions(const std::string& str = defaultOptions) : osgDB::ReaderWriter::Options(str), - _matlib(0), _calcLights(false), + _matlib(0), _calcLights(true), _useRandomObjects(false), _useRandomVegetation(false) {} @@ -58,5 +57,6 @@ protected: bool _calcLights; bool _useRandomObjects; bool _useRandomVegetation; + static std::string defaultOptions; }; #endif