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

View File

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