CAnimTreeSequence: std::move constructor parameters where applicable

Allows the constructor arguments to be moved into the constructor.
This commit is contained in:
Lioncash 2020-03-09 11:33:22 -04:00
parent fa23d0bb9c
commit 9fe671af99
2 changed files with 14 additions and 15 deletions

View File

@ -6,22 +6,22 @@
namespace urde { namespace urde {
CAnimTreeSequence::CAnimTreeSequence(const std::vector<std::shared_ptr<IMetaAnim>>& seq, const CAnimSysContext& animSys, CAnimTreeSequence::CAnimTreeSequence(std::vector<std::shared_ptr<IMetaAnim>> seq, CAnimSysContext animSys,
std::string_view name) std::string_view name)
: CAnimTreeSingleChild(seq[0]->GetAnimationTree(animSys, CMetaAnimTreeBuildOrders::NoSpecialOrders()), name) : CAnimTreeSingleChild(seq[0]->GetAnimationTree(animSys, CMetaAnimTreeBuildOrders::NoSpecialOrders()), name)
, x18_animCtx(animSys) , x18_animCtx(std::move(animSys))
, x28_sequence(seq) , x28_sequence(std::move(seq))
, x3c_fundamentals(CSequenceHelper(seq, animSys).ComputeSequenceFundamentals()) , x3c_fundamentals(CSequenceHelper(x28_sequence, x18_animCtx).ComputeSequenceFundamentals())
, x94_curTime(0.f) {} , x94_curTime(0.f) {}
CAnimTreeSequence::CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode, CAnimTreeSequence::CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode,
const std::vector<std::shared_ptr<IMetaAnim>>& metaAnims, std::vector<std::shared_ptr<IMetaAnim>> metaAnims,
const CAnimSysContext& animSys, std::string_view name, CAnimSysContext animSys, std::string_view name,
const CSequenceFundamentals& fundamentals, const CCharAnimTime& time) CSequenceFundamentals fundamentals, const CCharAnimTime& time)
: CAnimTreeSingleChild(curNode, name) : CAnimTreeSingleChild(curNode, name)
, x18_animCtx(animSys) , x18_animCtx(std::move(animSys))
, x28_sequence(metaAnims) , x28_sequence(std::move(metaAnims))
, x3c_fundamentals(fundamentals) , x3c_fundamentals(std::move(fundamentals))
, x94_curTime(time) {} , x94_curTime(time) {}
CAnimTreeEffectiveContribution CAnimTreeSequence::VGetContributionOfHighestInfluence() const { CAnimTreeEffectiveContribution CAnimTreeSequence::VGetContributionOfHighestInfluence() const {

View File

@ -20,11 +20,10 @@ class CAnimTreeSequence : public CAnimTreeSingleChild {
CCharAnimTime x94_curTime; CCharAnimTime x94_curTime;
public: public:
CAnimTreeSequence(const std::vector<std::shared_ptr<IMetaAnim>>& seq, const CAnimSysContext& animSys, CAnimTreeSequence(std::vector<std::shared_ptr<IMetaAnim>> seq, CAnimSysContext animSys, std::string_view name);
std::string_view name); CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode, std::vector<std::shared_ptr<IMetaAnim>> metaAnims,
CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode, CAnimSysContext animSys, std::string_view name, CSequenceFundamentals fundamentals,
const std::vector<std::shared_ptr<IMetaAnim>>& metaAnims, const CAnimSysContext& animSys, const CCharAnimTime& time);
std::string_view name, const CSequenceFundamentals& fundamentals, const CCharAnimTime& time);
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override;
std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const override; std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const override;