We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01ab2b7 commit 341d867Copy full SHA for 341d867
include/behaviortree_cpp/bt_factory.h
@@ -82,7 +82,26 @@ struct Tree
82
std::vector<Blackboard::Ptr> blackboard_stack;
83
std::unordered_map<std::string, TreeNodeManifest> manifests;
84
85
- Tree() : root_node(nullptr) { }
+ Tree(): root_node(nullptr) {}
86
+
87
+ // non-copyable. Only movable
88
+ Tree(const Tree& ) = delete;
89
+ Tree& operator=(const Tree&) = delete;
90
91
+ Tree(Tree&& other)
92
+ {
93
+ (*this) = std::move(other);
94
+ }
95
96
+ Tree& operator=(Tree&& other)
97
98
+ root_node = std::move(other.root_node);
99
+ nodes = std::move(other.nodes);
100
+ blackboard_stack = std::move(other.blackboard_stack);
101
+ manifests = std::move(other.manifests);
102
+ return *this;
103
104
105
~Tree();
106
107
Blackboard::Ptr rootBlackboard();
0 commit comments