From 5793f5cf187fb67baf7f23c17ddd93b703164b97 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 15 Aug 2021 20:11:55 +0200 Subject: [PATCH] Sprinkle a couple of std::move and a const --- components/resource/keyframemanager.cpp | 2 +- components/sceneutil/mwshadowtechnique.cpp | 2 +- components/sceneutil/shadowsbin.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/resource/keyframemanager.cpp b/components/resource/keyframemanager.cpp index 69986fbcd9..77c31d9ad7 100644 --- a/components/resource/keyframemanager.cpp +++ b/components/resource/keyframemanager.cpp @@ -40,7 +40,7 @@ namespace Resource } osg::ref_ptr mergedAnimationTrack = new Resource::Animation; - std::string animationName = animation->getName(); + const std::string animationName = animation->getName(); mergedAnimationTrack->setName(animationName); const osgAnimation::ChannelList& channels = animation->getChannels(); diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index 19222eda23..95ff8f2b01 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -2141,7 +2141,7 @@ struct ConvexHull finalEdges.push_back(edge); } - _edges = finalEdges; + _edges = std::move(finalEdges); } void transform(const osg::Matrixd& m) diff --git a/components/sceneutil/shadowsbin.cpp b/components/sceneutil/shadowsbin.cpp index abc1fa8b44..14dbc14178 100644 --- a/components/sceneutil/shadowsbin.cpp +++ b/components/sceneutil/shadowsbin.cpp @@ -221,7 +221,7 @@ void ShadowsBin::sortImplementation() } if (!noTestRoot->_leaves.empty()) newList.push_back(noTestRoot); - _stateGraphList = newList; + _stateGraphList = std::move(newList); } }