Make Coverity happy about animation blending

pull/3236/head
Alexei Kotov 5 months ago
parent 312b7af954
commit 03091f8ce0

@ -143,6 +143,11 @@ namespace MWRender
setKeyframeTrack(keyframeTrack, newState, blendRules); setKeyframeTrack(keyframeTrack, newState, blendRules);
} }
AnimBlendController::AnimBlendController()
: mEasingFn(&Easings::sineOut)
{
}
NifAnimBlendController::NifAnimBlendController(const osg::ref_ptr<SceneUtil::KeyframeController>& keyframeTrack, NifAnimBlendController::NifAnimBlendController(const osg::ref_ptr<SceneUtil::KeyframeController>& keyframeTrack,
const AnimBlendStateData& newState, const osg::ref_ptr<const SceneUtil::AnimBlendRules>& blendRules) const AnimBlendStateData& newState, const osg::ref_ptr<const SceneUtil::AnimBlendRules>& blendRules)
: AnimBlendController(keyframeTrack, newState, blendRules) : AnimBlendController(keyframeTrack, newState, blendRules)

@ -30,7 +30,7 @@ namespace MWRender
AnimBlendController(const osg::ref_ptr<SceneUtil::KeyframeController>& keyframeTrack, AnimBlendController(const osg::ref_ptr<SceneUtil::KeyframeController>& keyframeTrack,
const AnimBlendStateData& animState, const osg::ref_ptr<const SceneUtil::AnimBlendRules>& blendRules); const AnimBlendStateData& animState, const osg::ref_ptr<const SceneUtil::AnimBlendRules>& blendRules);
AnimBlendController() {} AnimBlendController();
void setKeyframeTrack(const osg::ref_ptr<SceneUtil::KeyframeController>& kft, void setKeyframeTrack(const osg::ref_ptr<SceneUtil::KeyframeController>& kft,
const AnimBlendStateData& animState, const osg::ref_ptr<const SceneUtil::AnimBlendRules>& blendRules); const AnimBlendStateData& animState, const osg::ref_ptr<const SceneUtil::AnimBlendRules>& blendRules);
@ -111,7 +111,7 @@ namespace MWRender
{ {
public: public:
BoneAnimBlendControllerWrapper(osg::ref_ptr<BoneAnimBlendController> rootCallback, osgAnimation::Bone* node) BoneAnimBlendControllerWrapper(osg::ref_ptr<BoneAnimBlendController> rootCallback, osgAnimation::Bone* node)
: mRootCallback(rootCallback) : mRootCallback(std::move(rootCallback))
, mNode(node) , mNode(node)
{ {
} }
@ -135,7 +135,7 @@ namespace MWRender
private: private:
osg::ref_ptr<BoneAnimBlendController> mRootCallback; osg::ref_ptr<BoneAnimBlendController> mRootCallback;
osgAnimation::Bone* mNode; osgAnimation::Bone* mNode{ nullptr };
}; };
} }

@ -30,7 +30,7 @@ namespace SceneUtil
if (delimiterInd == std::string::npos) if (delimiterInd == std::string::npos)
{ {
group = full; group = std::move(full);
Misc::StringUtils::trim(group); Misc::StringUtils::trim(group);
} }
else else

Loading…
Cancel
Save