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
This commit is contained in:
@@ -56,7 +56,7 @@ bool SGPagedLOD::addChild(osg::Node *child)
|
||||
{
|
||||
osg::ref_ptr<SGModelData> d = opts->getModelData();
|
||||
if(d.valid())
|
||||
d->modelLoaded(getFileName(getNumChildren()-1), d->getProperties(),
|
||||
d->modelLoaded(getFileName(getNumChildren()-1), 0,
|
||||
this);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -312,7 +312,6 @@ sgLoad3DModel_internal(const string &path,
|
||||
}
|
||||
|
||||
if (data) {
|
||||
data->setProps(props);
|
||||
options->setModelData(data);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user