Skip to content

Commit 4189c72

Browse files
authored
bugfix: typo in comments (BehaviorTree#459)
1 parent b4396fe commit 4189c72

File tree

13 files changed

+23
-24
lines changed

13 files changed

+23
-24
lines changed

include/behaviortree_cpp/action_node.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ using AsyncActionNode = ThreadedActionNode;
141141
#endif
142142

143143
/**
144-
* @brief The StatefulAsyncAction is the prefered way to implement asynchronous Actions.
144+
* @brief The StatefulAsyncAction is the preferred way to implement asynchronous Actions.
145145
* It is actually easier to use correctly, when compared with AsyncAction
146146
*
147147
* It is particularly useful when your code contains a request-reply pattern,
148-
* i.e. when the actions sends an asychronous request, then checks periodically
148+
* i.e. when the actions sends an asynchronous request, then checks periodically
149149
* if the reply has been received and, eventually, analyze the reply to determine
150150
* if the result is SUCCESS or FAILURE.
151151
*
@@ -163,7 +163,7 @@ class StatefulActionNode : public ActionNodeBase
163163
{}
164164

165165
/// Method called once, when transitioning from the state IDLE.
166-
/// If it returns RUNNING, this becomes an asychronous node.
166+
/// If it returns RUNNING, this becomes an asynchronous node.
167167
virtual NodeStatus onStart() = 0;
168168

169169
/// method invoked when the action is already in the RUNNING state.
@@ -189,7 +189,7 @@ class StatefulActionNode : public ActionNodeBase
189189

190190
/**
191191
* @brief The CoroActionNode class is an a good candidate for asynchronous actions
192-
* which need to communicate with an external service using an asynch request/reply interface.
192+
* which need to communicate with an external service using an async request/reply interface.
193193
*
194194
* It is up to the user to decide when to suspend execution of the Action and resume
195195
* the parent node, invoking the method setStatusRunningAndYield().

include/behaviortree_cpp/basic_types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ float convertFromString<float>(StringView str);
107107
template <>
108108
double convertFromString<double>(StringView str);
109109

110-
template <> // Integer numbers separated by the characted ";"
110+
template <> // Integer numbers separated by the character ";"
111111
std::vector<int> convertFromString<std::vector<int>>(StringView str);
112112

113-
template <> // Real numbers separated by the characted ";"
113+
template <> // Real numbers separated by the character ";"
114114
std::vector<double> convertFromString<std::vector<double>>(StringView str);
115115

116116
template <> // This recognizes either 0/1, true/false, TRUE/FALSE
@@ -292,7 +292,7 @@ std::pair<std::string, PortInfo> CreatePort(PortDirection direction, StringView
292292
auto sname = static_cast<std::string>(name);
293293
if (!IsAllowedPortName(sname))
294294
{
295-
throw RuntimeError("The name of a port must start with an alphabetic characted. "
295+
throw RuntimeError("The name of a port must start with an alphabetic character. "
296296
"Underscore is reserved.");
297297
}
298298

include/behaviortree_cpp/controls/parallel_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace BT
2929
* The Node is completed either when the THRESHOLD_SUCCESS
3030
* or THRESHOLD_FAILURE number is reached (both configured using ports).
3131
*
32-
* If any of the threaholds is reached, and other children are still running,
32+
* If any of the thresholds is reached, and other children are still running,
3333
* they will be halted.
3434
*
3535
* Note that threshold indexes work as in Python:

include/behaviortree_cpp/decorators/retry_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace BT
3333
* </RetryUntilSuccessful>
3434
*
3535
* Note:
36-
* RetryNodeTypo is only included to support the depricated typo
36+
* RetryNodeTypo is only included to support the deprecated typo
3737
* "RetryUntilSuccesful" (note the single 's' in Succesful)
3838
*/
3939
class RetryNode : public DecoratorNode

include/behaviortree_cpp/decorators/subtree_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace BT
4545
*
4646
* 3) Subtree: "{param}" -> Parent: "{parent}"
4747
* Setting to true (or 1) the attribute "_autoremap", we are automatically remapping
48-
* each port. Usefull to avoid boilerplate.
48+
* each port. Useful to avoid boilerplate.
4949
*/
5050
class SubTreeNode : public DecoratorNode
5151
{

include/behaviortree_cpp/decorators/timer_queue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class TimerQueue
121121
// Zero time, so it stays at the top for immediate execution
122122
newItem.end = std::chrono::time_point<_Clock, _Duration>();
123123
newItem.id = 0; // Means it is a canceled item
124-
// Move the handler from item to newitem.
124+
// Move the handler from item to newItem.
125125
// Also, we need to manually set the handler to nullptr, since
126126
// the standard does not guarantee moving an std::function will
127127
// empty it. Some STL implementation will empty it, others will

include/behaviortree_cpp/scripting/operators.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ struct Expression : lexy::expression_production
464464

465465
// Each of the nested classes defines one operation.
466466
// They inherit from a tag type that specify the kind of operation (prefix, infix, postfix),
467-
// and associativy (left, right, single (non-associative)),
467+
// and associativity (left, right, single (non-associative)),
468468
// and specify the operator rule and operand.
469469

470470
// -x

include/behaviortree_cpp/scripting/script_parser.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Ast
2626
{
2727
/**
2828
* @brief The Environment class is used to encapsulate
29-
* the information and states neded by the sriting language
29+
* the information and states needed by the scripting language
3030
*/
3131
struct Environment{
3232
BT::Blackboard::Ptr vars;

include/behaviortree_cpp/tree_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class TreeNode
208208
template <typename T>
209209
Result setOutput(const std::string& key, const T& value);
210210

211-
// function provide mostrly for debugging purpose to see the raw value
211+
// function provide mostly for debugging purpose to see the raw value
212212
// in the port (no remapping and no conversion to a type)
213213
StringView getRawPortValue(const std::string& key) const;
214214

include/behaviortree_cpp/utils/any.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class any final
143143
if (this->vtable != nullptr)
144144
{
145145
this->vtable->move(this->storage, rhs.storage);
146-
//this->vtable = nullptr; -- uneeded, see below
146+
//this->vtable = nullptr; -- unneeded, see below
147147
}
148148

149149
// move from tmp (previously rhs) to *this.
@@ -174,7 +174,7 @@ class any final
174174
/// Base VTable specification.
175175
struct vtable_type
176176
{
177-
// Note: The caller is responssible for doing .vtable = nullptr after destructful operations
177+
// Note: The caller is responsible for doing .vtable = nullptr after destructive operations
178178
// such as destroy() and/or move().
179179

180180
/// The type of the object this vtable is for.
@@ -184,11 +184,11 @@ class any final
184184
/// The state of the union after this call is unspecified, caller must ensure not to use src anymore.
185185
void (*destroy)(storage_union&) noexcept;
186186

187-
/// Copies the **inner** content of the src union into the yet unitialized dest union.
187+
/// Copies the **inner** content of the src union into the yet uninitialized dest union.
188188
/// As such, both inner objects will have the same state, but on separate memory locations.
189189
void (*copy)(const storage_union& src, storage_union& dest);
190190

191-
/// Moves the storage from src to the yet unitialized dest union.
191+
/// Moves the storage from src to the yet uninitialized dest union.
192192
/// The state of src after this call is unspecified, caller must ensure not to use src anymore.
193193
void (*move)(storage_union& src, storage_union& dest) noexcept;
194194

@@ -224,7 +224,7 @@ class any final
224224

225225
static void swap(storage_union& lhs, storage_union& rhs) noexcept
226226
{
227-
// just exchage the storage pointers.
227+
// just exchange the storage pointers.
228228
std::swap(lhs.dynamic, rhs.dynamic);
229229
}
230230
};

src/xml_parsing.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,7 @@ TreeNode::Ptr XMLParser::Pimpl::createNodeFromXML(const XMLElement* element,
550550
throw RuntimeError("Possible typo? In the XML, you tried to remap port \"",
551551
remap_it.first, "\" in node [", type_ID, " / ", instance_name,
552552
"], but the manifest of this node does not contain a port "
553-
"with this "
554-
"name.");
553+
"with this name.");
555554
}
556555
}
557556

tests/gtest_sequence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ TEST_F(SequenceTripleActionTest, TripleAction)
251251
ASSERT_EQ(NodeStatus::IDLE, action_2.status());
252252
ASSERT_EQ(NodeStatus::IDLE, action_3.status());
253253

254-
// continue until succesful
254+
// continue until successful
255255
while (state != NodeStatus::SUCCESS && system_clock::now() < timeout)
256256
{
257257
std::this_thread::sleep_for(milliseconds(10));

tests/navigation_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ TEST(Navigationtest, MoveBaseRecovery)
246246

247247
// Second case: get stuck after a while
248248

249-
// Initialize evrything first
249+
// Initialize everything first
250250
first_stuck_node->resetTickCount();
251251
second_stuck_node->resetTickCount();
252252
compute_node->resetTickCount();
@@ -257,7 +257,7 @@ TEST(Navigationtest, MoveBaseRecovery)
257257

258258
while (status == NodeStatus::IDLE || status == NodeStatus::RUNNING)
259259
{
260-
// At the fifth cycle get stucked
260+
// At the fifth cycle get stuck
261261
if (++cycle == 2)
262262
{
263263
first_stuck_node->setExpectedResult(true);

0 commit comments

Comments
 (0)