mirror of https://github.com/AxioDL/metaforce.git
CSequenceHelper: std::move constructor parameters where applicable
Same behavior, but allows for calling code to move into the interface.
This commit is contained in:
parent
cff12f0986
commit
815f492e0f
|
@ -10,30 +10,29 @@
|
|||
|
||||
namespace urde {
|
||||
|
||||
CSequenceFundamentals::CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo,
|
||||
const std::vector<CBoolPOINode>& boolNodes,
|
||||
const std::vector<CInt32POINode>& int32Nodes,
|
||||
const std::vector<CParticlePOINode>& particleNodes,
|
||||
const std::vector<CSoundPOINode>& soundNodes)
|
||||
CSequenceFundamentals::CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, std::vector<CBoolPOINode> boolNodes,
|
||||
std::vector<CInt32POINode> int32Nodes,
|
||||
std::vector<CParticlePOINode> particleNodes,
|
||||
std::vector<CSoundPOINode> soundNodes)
|
||||
: x0_ssInfo(ssInfo)
|
||||
, x18_boolNodes(boolNodes)
|
||||
, x28_int32Nodes(int32Nodes)
|
||||
, x38_particleNodes(particleNodes)
|
||||
, x48_soundNodes(soundNodes) {}
|
||||
, x18_boolNodes(std::move(boolNodes))
|
||||
, x28_int32Nodes(std::move(int32Nodes))
|
||||
, x38_particleNodes(std::move(particleNodes))
|
||||
, x48_soundNodes(std::move(soundNodes)) {}
|
||||
|
||||
CSequenceHelper::CSequenceHelper(const std::shared_ptr<CAnimTreeNode>& a, const std::shared_ptr<CAnimTreeNode>& b,
|
||||
const CAnimSysContext& animCtx)
|
||||
: x0_animCtx(animCtx) {
|
||||
CAnimSysContext animCtx)
|
||||
: x0_animCtx(std::move(animCtx)) {
|
||||
x10_treeNodes.reserve(2);
|
||||
x10_treeNodes.push_back(a);
|
||||
x10_treeNodes.push_back(b);
|
||||
}
|
||||
|
||||
CSequenceHelper::CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, const CAnimSysContext& animCtx)
|
||||
: x0_animCtx(animCtx) {
|
||||
CSequenceHelper::CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, CAnimSysContext animCtx)
|
||||
: x0_animCtx(std::move(animCtx)) {
|
||||
x10_treeNodes.reserve(nodes.size());
|
||||
for (const std::shared_ptr<IMetaAnim>& meta : nodes)
|
||||
x10_treeNodes.push_back(meta->GetAnimationTree(animCtx, CMetaAnimTreeBuildOrders::NoSpecialOrders()));
|
||||
x10_treeNodes.push_back(meta->GetAnimationTree(x0_animCtx, CMetaAnimTreeBuildOrders::NoSpecialOrders()));
|
||||
}
|
||||
|
||||
CSequenceFundamentals CSequenceHelper::ComputeSequenceFundamentals() {
|
||||
|
|
|
@ -22,10 +22,9 @@ class CSequenceFundamentals {
|
|||
std::vector<CSoundPOINode> x48_soundNodes;
|
||||
|
||||
public:
|
||||
CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, const std::vector<CBoolPOINode>& boolNodes,
|
||||
const std::vector<CInt32POINode>& int32Nodes,
|
||||
const std::vector<CParticlePOINode>& particleNodes,
|
||||
const std::vector<CSoundPOINode>& soundNodes);
|
||||
CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, std::vector<CBoolPOINode> boolNodes,
|
||||
std::vector<CInt32POINode> int32Nodes, std::vector<CParticlePOINode> particleNodes,
|
||||
std::vector<CSoundPOINode> soundNodes);
|
||||
|
||||
const CSteadyStateAnimInfo& GetSteadyStateAnimInfo() const { return x0_ssInfo; }
|
||||
const std::vector<CBoolPOINode>& GetBoolPointsOfInterest() const { return x18_boolNodes; }
|
||||
|
@ -41,8 +40,8 @@ class CSequenceHelper {
|
|||
|
||||
public:
|
||||
CSequenceHelper(const std::shared_ptr<CAnimTreeNode>& a, const std::shared_ptr<CAnimTreeNode>& b,
|
||||
const CAnimSysContext& animCtx);
|
||||
CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, const CAnimSysContext& animCtx);
|
||||
CAnimSysContext animCtx);
|
||||
CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, CAnimSysContext animCtx);
|
||||
CSequenceFundamentals ComputeSequenceFundamentals();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue