From 4286cafdebb061ed43351306b5d47700f2d49de2 Mon Sep 17 00:00:00 2001 From: frohlich Date: Sun, 7 Jun 2009 11:26:48 +0000 Subject: [PATCH] Doing the compilers job: constant propagation. This variable is nowhere set except to zero. Modified Files: model/SGPagedLOD.cxx model/SGReaderWriterXML.cxx model/modellib.cxx model/modellib.hxx --- simgear/scene/model/SGPagedLOD.cxx | 2 +- simgear/scene/model/SGReaderWriterXML.cxx | 1 - simgear/scene/model/modellib.cxx | 2 +- simgear/scene/model/modellib.hxx | 12 ++---------- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/simgear/scene/model/SGPagedLOD.cxx b/simgear/scene/model/SGPagedLOD.cxx index 541c6350..96a0656d 100644 --- a/simgear/scene/model/SGPagedLOD.cxx +++ b/simgear/scene/model/SGPagedLOD.cxx @@ -56,7 +56,7 @@ bool SGPagedLOD::addChild(osg::Node *child) { osg::ref_ptr d = opts->getModelData(); if(d.valid()) - d->modelLoaded(getFileName(getNumChildren()-1), d->getProperties(), + d->modelLoaded(getFileName(getNumChildren()-1), 0, this); } return true; diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index 68147571..f6189274 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -312,7 +312,6 @@ sgLoad3DModel_internal(const string &path, } if (data) { - data->setProps(props); options->setModelData(data); } diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index dda15a92..95644351 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -67,7 +67,7 @@ SGModelLib::loadModel(const string &path, opt->setModelData(data); osg::Node *n = readNodeFile(path, opt.get()); if(data) - data->modelLoaded(path, data->getProperties(), n); + data->modelLoaded(path, 0, n); if (n && n->getName().empty()) n->setName("Direct loaded model \"" + path + "\""); return n; diff --git a/simgear/scene/model/modellib.hxx b/simgear/scene/model/modellib.hxx index f40ba92e..7c38b10a 100644 --- a/simgear/scene/model/modellib.hxx +++ b/simgear/scene/model/modellib.hxx @@ -83,16 +83,8 @@ protected: class SGModelData : public osg::Referenced { public: virtual ~SGModelData() {} - virtual void modelLoaded( const string& path, SGPropertyNode *prop, - osg::Node*branch) = 0; - - virtual void setProps(SGPropertyNode *p) - { _props = p; } - - SGPropertyNode *getProperties() - { return _props; } -protected: - SGPropertyNode_ptr _props; + virtual void modelLoaded(const string& path, SGPropertyNode *prop, + osg::Node* branch) = 0; }; } -- 2.39.5