@@ -138,9 +138,9 @@ class TreeNode
138138 using StatusChangeCallback = StatusChangeSignal::CallableFunction;
139139
140140 using PreTickOverrideCallback =
141- std::function<Optional <NodeStatus>(TreeNode&, NodeStatus)>;
141+ std::function<Expected <NodeStatus>(TreeNode&, NodeStatus)>;
142142 using PostTickOverrideCallback =
143- std::function<Optional <NodeStatus>(TreeNode&, NodeStatus, NodeStatus)>;
143+ std::function<Expected <NodeStatus>(TreeNode&, NodeStatus, NodeStatus)>;
144144
145145 /* *
146146 * @brief subscribeToStatusChange is used to attach a callback to a status change.
@@ -198,11 +198,11 @@ class TreeNode
198198 * but using optional.
199199 */
200200 template <typename T>
201- Optional <T> getInput (const std::string& key) const
201+ Expected <T> getInput (const std::string& key) const
202202 {
203203 T out;
204204 auto res = getInput (key, out);
205- return (res) ? Optional <T>(out) : nonstd::make_unexpected (res.error ());
205+ return (res) ? Expected <T>(out) : nonstd::make_unexpected (res.error ());
206206 }
207207
208208 template <typename T>
@@ -218,7 +218,7 @@ class TreeNode
218218
219219 static StringView stripBlackboardPointer (StringView str);
220220
221- static Optional <StringView> getRemappedKey (StringView port_name,
221+ static Expected <StringView> getRemappedKey (StringView port_name,
222222 StringView remapped_port);
223223
224224 // / Notify that the tree should be ticked again()
@@ -304,7 +304,7 @@ class TreeNode
304304
305305 std::shared_ptr<ScriptingEnumsRegistry> scripting_enums_;
306306
307- Optional <NodeStatus> checkPreConditions ();
307+ Expected <NodeStatus> checkPreConditions ();
308308 void checkPostConditions (NodeStatus status);
309309
310310 // / The method used to interrupt the execution of a RUNNING node.
0 commit comments