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:
frohlich
2009-06-07 11:26:48 +00:00
committed by Tim Moore
parent 3880d8e2f2
commit 4286cafdeb
4 changed files with 4 additions and 13 deletions

View File

@@ -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;

View File

@@ -312,7 +312,6 @@ sgLoad3DModel_internal(const string &path,
}
if (data) {
data->setProps(props);
options->setModelData(data);
}

View File

@@ -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;

View File

@@ -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;
};
}