From 72f1538ac2fc0e509cd0a8f9011ed5eecad7d189 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Sun, 4 Mar 2012 07:50:05 +0100 Subject: [PATCH] Make use of SGReaderWriterOptions::copyOrCreate in ReaderWriterSTG. --- simgear/scene/tgdb/TileEntry.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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; -- 2.39.5