CTransitionDatabaseGame: std::move constructor parameters where applicable

Same behavior, but allows the parameters to be moved into from calling
code.
This commit is contained in:
Lioncash 2020-03-09 11:48:14 -04:00
parent 815f492e0f
commit 3a96c574b2
2 changed files with 3 additions and 3 deletions

View File

@ -11,8 +11,8 @@ namespace urde {
CTransitionDatabaseGame::CTransitionDatabaseGame(const std::vector<CTransition>& transitions,
const std::vector<CHalfTransition>& halfTransitions,
const std::shared_ptr<IMetaTrans>& defaultTrans)
: x10_defaultTrans(defaultTrans) {
std::shared_ptr<IMetaTrans> defaultTrans)
: x10_defaultTrans(std::move(defaultTrans)) {
x14_transitions.reserve(transitions.size());
for (const CTransition& trans : transitions)
x14_transitions.emplace_back(trans.GetAnimPair(), trans.GetMetaTrans());

View File

@ -18,7 +18,7 @@ class CTransitionDatabaseGame final : public CTransitionDatabase {
public:
CTransitionDatabaseGame(const std::vector<CTransition>& transitions,
const std::vector<CHalfTransition>& halfTransitions,
const std::shared_ptr<IMetaTrans>& defaultTrans);
std::shared_ptr<IMetaTrans> defaultTrans);
const std::shared_ptr<IMetaTrans>& GetMetaTrans(u32, u32) const override;
};