From dca0e2f582ea3996248039e636ff0ba28e373128 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 3 Jan 2016 16:43:20 +0100 Subject: [PATCH] Pass a Vec4f by reference --- components/sceneutil/lightcontroller.cpp | 2 +- components/sceneutil/lightcontroller.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/sceneutil/lightcontroller.cpp b/components/sceneutil/lightcontroller.cpp index 511937a28..e3ea93843 100644 --- a/components/sceneutil/lightcontroller.cpp +++ b/components/sceneutil/lightcontroller.cpp @@ -125,7 +125,7 @@ namespace SceneUtil traverse(node, nv); } - void LightController::setDiffuse(osg::Vec4f color) + void LightController::setDiffuse(const osg::Vec4f& color) { mDiffuseColor = color; } diff --git a/components/sceneutil/lightcontroller.hpp b/components/sceneutil/lightcontroller.hpp index f6e2fa9fa..8f70af343 100644 --- a/components/sceneutil/lightcontroller.hpp +++ b/components/sceneutil/lightcontroller.hpp @@ -24,7 +24,7 @@ namespace SceneUtil void setType(LightType type); - void setDiffuse(osg::Vec4f color); + void setDiffuse(const osg::Vec4f& color); virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);