From afdd7a2900fd347c7998a1355874e656856c65b3 Mon Sep 17 00:00:00 2001 From: Subham Date: Fri, 13 Mar 2026 13:29:35 +0530 Subject: [PATCH] name functor is removed for function pointer, as it is defined for a class/struc which overloads function call operator '()'. In C++, a function pointer is not a "functor" in the common C++ sense, but both are types of callable objects. A functor (function object) is specifically a class or struct that overloads the function call operator() --- docs/tutorial-basics/tutorial_01_first_tree.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial-basics/tutorial_01_first_tree.md b/docs/tutorial-basics/tutorial_01_first_tree.md index 6e0f2da..c5e7c52 100644 --- a/docs/tutorial-basics/tutorial_01_first_tree.md +++ b/docs/tutorial-basics/tutorial_01_first_tree.md @@ -52,9 +52,9 @@ As you can see: It must always return a `NodeStatus`, i.e. RUNNING, SUCCESS or FAILURE. Alternatively, we can use __dependency injection__ to create a TreeNode given -a function pointer (i.e. "functor"). +a function pointer. -The functor must have this signature: +The Functions (to use as a function pointer) must have this signature: ``` cpp BT::NodeStatus myFunction(BT::TreeNode& self) @@ -98,7 +98,7 @@ private: ``` -We can build a `SimpleActionNode` from any of these functors: +We can build a `SimpleActionNode` from any of these functions: - CheckBattery() - GripperInterface::open()