@@ -13,7 +13,6 @@ using namespace BT;
1313 * its own thread).
1414*/
1515
16-
1716// clang-format off
1817
1918const std::string xml_text_sequence = R"(
@@ -54,16 +53,17 @@ const std::string xml_text_sequence_star = R"(
5453
5554void Assert (bool condition)
5655{
57- if ( !condition ) throw std::runtime_error (" this is not what I expected" );
56+ if (!condition)
57+ throw std::runtime_error (" this is not what I expected" );
5858}
5959
6060int main ()
6161{
6262 using namespace DummyNodes ;
6363
6464 BehaviorTreeFactory factory;
65- factory.registerSimpleCondition (" TemperatureOK" , std::bind ( CheckBattery ));
66- factory.registerSimpleCondition (" BatteryOK" , std::bind ( CheckTemperature ));
65+ factory.registerSimpleCondition (" TemperatureOK" , std::bind (CheckBattery));
66+ factory.registerSimpleCondition (" BatteryOK" , std::bind (CheckTemperature));
6767 factory.registerNodeType <MoveBaseAction>(" MoveBase" );
6868 factory.registerNodeType <SaySomething>(" SaySomething" );
6969
@@ -74,7 +74,7 @@ int main()
7474 // 1) When Sequence is used, BatteryOK and TempearaturOK is executed at each tick()
7575 // 2) When SequenceStar is used, those ConditionNodes are executed only once.
7676
77- for (auto & xml_text: {xml_text_sequence, xml_text_sequence_star})
77+ for (auto & xml_text : {xml_text_sequence, xml_text_sequence_star})
7878 {
7979 std::cout << " \n ------------ BUILDING A NEW TREE ------------" << std::endl;
8080
@@ -84,17 +84,17 @@ int main()
8484
8585 std::cout << " \n --- 1st executeTick() ---" << std::endl;
8686 status = tree.root_node ->executeTick ();
87- Assert ( status == NodeStatus::RUNNING);
87+ Assert (status == NodeStatus::RUNNING);
8888
8989 SleepMS (150 );
9090 std::cout << " \n --- 2nd executeTick() ---" << std::endl;
9191 status = tree.root_node ->executeTick ();
92- Assert ( status == NodeStatus::RUNNING);
92+ Assert (status == NodeStatus::RUNNING);
9393
9494 SleepMS (150 );
9595 std::cout << " \n --- 3rd executeTick() ---" << std::endl;
9696 status = tree.root_node ->executeTick ();
97- Assert ( status == NodeStatus::SUCCESS);
97+ Assert (status == NodeStatus::SUCCESS);
9898
9999 std::cout << std::endl;
100100 }
@@ -138,4 +138,3 @@ Robot says: "mission started..."
138138Robot says: "mission completed!"
139139
140140*/
141-
0 commit comments