From Mikhail Izmestev, "Attached fix to avoid vector reallocs on push_back in StateGraph::moveStateGraph."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14334 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
147c5e183f
commit
bb8b1538c7
@ -207,6 +207,7 @@ class OSGUTIL_EXPORT StateGraph : public osg::Referenced
|
||||
|
||||
// use return path to trace back steps to sg_new.
|
||||
std::vector<StateGraph*> return_path;
|
||||
return_path.reserve(sg_new->_depth+1);
|
||||
|
||||
// need to pop back root render graph.
|
||||
do
|
||||
@ -248,6 +249,7 @@ class OSGUTIL_EXPORT StateGraph : public osg::Referenced
|
||||
|
||||
// use return path to trace back steps to sg_new.
|
||||
std::vector<StateGraph*> return_path;
|
||||
return_path.reserve(sg_new->_depth+1);
|
||||
|
||||
// need to pop back up to the same depth as the curr state group.
|
||||
while (sg_new->_depth>sg_curr->_depth)
|
||||
|
Loading…
Reference in New Issue
Block a user