From: frohlich Date: Sun, 7 Jun 2009 11:26:48 +0000 (+0000) Subject: Doing the compilers job: constant propagation. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4286cafdebb061ed43351306b5d47700f2d49de2;p=simgear.git 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 --- 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; }; }