From: Mathias Froehlich Date: Sun, 4 Mar 2012 06:50:05 +0000 (+0100) Subject: Make use of SGReaderWriterOptions::copyOrCreate in ReaderWriterSTG. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=72f1538ac2fc0e509cd0a8f9011ed5eecad7d189;p=simgear.git Make use of SGReaderWriterOptions::copyOrCreate in ReaderWriterSTG. --- diff --git a/simgear/scene/tgdb/TileEntry.cxx b/simgear/scene/tgdb/TileEntry.cxx index f139d145..47a72052 100644 --- a/simgear/scene/tgdb/TileEntry.cxx +++ b/simgear/scene/tgdb/TileEntry.cxx @@ -297,13 +297,8 @@ TileEntry::loadTileByFileName(const string& fileName, } } - const SGReaderWriterOptions* btgOpt; - btgOpt = dynamic_cast(options); osg::ref_ptr 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;