File tree Expand file tree Collapse file tree 2 files changed +4
-28
lines changed Expand file tree Collapse file tree 2 files changed +4
-28
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,8 @@ class Tree
109109 Tree (const Tree&) = delete ;
110110 Tree& operator =(const Tree&) = delete ;
111111
112- Tree (Tree&& other);
113- Tree& operator =(Tree&& other);
112+ Tree (Tree&& other) = default ;
113+ Tree& operator =(Tree&& other) = default ;
114114
115115 void initialize ();
116116
@@ -215,8 +215,8 @@ class BehaviorTreeFactory
215215 BehaviorTreeFactory (const BehaviorTreeFactory& other) = delete ;
216216 BehaviorTreeFactory& operator =(const BehaviorTreeFactory& other) = delete ;
217217
218- BehaviorTreeFactory (BehaviorTreeFactory&& other) noexcept ;
219- BehaviorTreeFactory& operator =(BehaviorTreeFactory&& other) noexcept ;
218+ BehaviorTreeFactory (BehaviorTreeFactory&& other) noexcept = default ;
219+ BehaviorTreeFactory& operator =(BehaviorTreeFactory&& other) noexcept = default ;
220220
221221 // / Remove a registered ID.
222222 bool unregisterBuilder (const std::string& ID);
Original file line number Diff line number Diff line change @@ -107,17 +107,6 @@ BehaviorTreeFactory::BehaviorTreeFactory() : _p(new PImpl)
107107 _p->scripting_enums = std::make_shared<std::unordered_map<std::string, int >>();
108108}
109109
110- BehaviorTreeFactory::BehaviorTreeFactory (BehaviorTreeFactory&& other) noexcept
111- {
112- this ->_p = std::move (other._p );
113- }
114-
115- BehaviorTreeFactory& BehaviorTreeFactory::operator =(BehaviorTreeFactory&& other) noexcept
116- {
117- this ->_p = std::move (other._p );
118- return *this ;
119- }
120-
121110BehaviorTreeFactory::~BehaviorTreeFactory ()
122111{}
123112
@@ -531,22 +520,9 @@ BehaviorTreeFactory::substitutionRules() const
531520 return _p->substitution_rules ;
532521}
533522
534- Tree& Tree::operator =(Tree&& other)
535- {
536- subtrees = std::move (other.subtrees );
537- manifests = std::move (other.manifests );
538- wake_up_ = other.wake_up_ ;
539- return *this ;
540- }
541-
542523Tree::Tree ()
543524{}
544525
545- Tree::Tree (Tree&& other)
546- {
547- (*this ) = std::move (other);
548- }
549-
550526void Tree::initialize ()
551527{
552528 wake_up_ = std::make_shared<WakeUpSignal>();
You can’t perform that action at this time.
0 commit comments