]> git.mxchange.org Git - simgear.git/commitdiff
Make use of SGReaderWriterOptions::copyOrCreate in ReaderWriterSTG.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Sun, 4 Mar 2012 06:50:05 +0000 (07:50 +0100)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Sun, 4 Mar 2012 06:50:05 +0000 (07:50 +0100)
simgear/scene/tgdb/TileEntry.cxx

index f139d1454724713291069135f623a200cf79980d..47a72052c760819879c9284aeef08b7d540c7478 100644 (file)
@@ -297,13 +297,8 @@ TileEntry::loadTileByFileName(const string& fileName,
         }
     }
 
-    const SGReaderWriterOptions* btgOpt;
-    btgOpt = dynamic_cast<const SGReaderWriterOptions*>(options);
     osg::ref_ptr<SGReaderWriterOptions> opt;
-    if (btgOpt)
-        opt = new SGReaderWriterOptions(*btgOpt);
-    else
-        opt = new SGReaderWriterOptions;
+    opt = SGReaderWriterOptions::copyOrCreate(options);
 
     // obj_load() will generate ground lighting for us ...
     osg::Group* new_tile = new osg::Group;