From 8c649f05e60963e5f250dde8e0dd3adcc22037d7 Mon Sep 17 00:00:00 2001 From: bzzt Date: Wed, 20 Feb 2019 13:37:00 +0000 Subject: [PATCH] Don't reallocate light list vector unnecessarily --- components/sceneutil/lightmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index cb6a12c879..f0fd0ef9f3 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -234,6 +234,7 @@ namespace SceneUtil { osg::ref_ptr stateset = new osg::StateSet; std::vector > lights; + lights.reserve(lightList.size()); for (unsigned int i=0; imLightSource->getLight(frameNum));