From Mikhail Izmestev, "Attached fix to avoid vector reallocs on push_back in StateGraph::moveStateGraph."

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14335 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-06-30 10:13:22 +00:00
parent 586c177db9
commit 4fefd87b80

View File

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