mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Fix memory leak, remove empty if statement, change dynamic_cast
to static_cast
This commit is contained in:
parent
5a7ebab694
commit
13c2161b27
@ -24,7 +24,7 @@ namespace CSVRender
|
|||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
PathgridTag* tag = dynamic_cast<PathgridTag*>(node->getUserData());
|
PathgridTag* tag = static_cast<PathgridTag*>(node->getUserData());
|
||||||
tag->getPathgrid()->update();
|
tag->getPathgrid()->update();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -44,10 +44,6 @@ namespace CSVRender
|
|||||||
QString text("Pathgrid: ");
|
QString text("Pathgrid: ");
|
||||||
text += mPathgrid->getId().c_str();
|
text += mPathgrid->getId().c_str();
|
||||||
|
|
||||||
if (!hideBasics)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,7 +458,7 @@ namespace CSVRender
|
|||||||
if (mPathgridGeometry)
|
if (mPathgridGeometry)
|
||||||
{
|
{
|
||||||
mPathgridGeode->removeDrawable(mPathgridGeometry);
|
mPathgridGeode->removeDrawable(mPathgridGeometry);
|
||||||
mPathgridGeometry.release();
|
mPathgridGeometry = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,7 +467,7 @@ namespace CSVRender
|
|||||||
if (mSelectedGeometry)
|
if (mSelectedGeometry)
|
||||||
{
|
{
|
||||||
mSelectedGeode->removeDrawable(mSelectedGeometry);
|
mSelectedGeode->removeDrawable(mSelectedGeometry);
|
||||||
mSelectedGeometry.release();
|
mSelectedGeometry = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user