]> git.mxchange.org Git - simgear.git/commitdiff
Eliminate empty default constructor for SGReaderWriterBTGOptions
authortimoore <timoore>
Sat, 19 Jul 2008 16:00:58 +0000 (16:00 +0000)
committertimoore <timoore>
Sat, 19 Jul 2008 16:00:58 +0000 (16:00 +0000)
simgear/scene/tgdb/SGReaderWriterBTG.cxx
simgear/scene/tgdb/SGReaderWriterBTGOptions.hxx

index 9c35ce6af60ff64e2437c3ff98b1371bc9e53e47..1ab674fd1664c79b0db2afeb0cff22f855cddf22 100644 (file)
 
 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";
index ed6123257d32ad4008b15940d51f31b59414268e..95892178714c6637078f05b49adfa98237b361b1 100644 (file)
 #include <simgear/scene/tgdb/obj.hxx>
 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