Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd17af90

Browse files
committed
Code formatted
1 parent9858e91 commitd17af90

File tree

2 files changed

+33
-36
lines changed

2 files changed

+33
-36
lines changed

‎src/xml_parsing.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,9 @@ void BT::XMLParser::PImpl::recursivelyCreateSubtree(const std::string& tree_ID,
940940
// check for recursion in behavior tree
941941
if(prefix.find(subtree_ID) != std::string::npos)
942942
{
943-
auto msg =StrCat("Recursive behavior trees are not supported. A cycle was found in",
944-
"<Subtree ID=\"", subtree_ID,"\"> with prefix:", prefix);
943+
auto msg =StrCat("Recursive behavior trees are not supported. A cycle was found"
944+
"in","<Subtree ID=\"", subtree_ID,
945+
"\"> with prefix:", prefix);
945946
throwRuntimeError(msg);
946947
}
947948

‎tests/gtest_subtree.cpp‎

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,14 @@ TEST(SubTree, RecursiveSubtree)
732732
// clang-format off
733733

734734
staticconstchar* xml_text =R"(
735-
<root BTCPP_format="4" >
736-
737-
<BehaviorTree ID="MainTree">
738-
<Sequence name="root">
739-
<AlwaysSuccess/>
740-
<SubTree ID="MainTree" />
741-
</Sequence>
742-
</BehaviorTree>
743-
744-
</root>
735+
<root BTCPP_format="4" >
736+
<BehaviorTree ID="MainTree">
737+
<Sequence name="root">
738+
<AlwaysSuccess/>
739+
<SubTree ID="MainTree" />
740+
</Sequence>
741+
</BehaviorTree>
742+
</root>
745743
)";
746744

747745
// clang-format on
@@ -757,29 +755,28 @@ TEST(SubTree, RecursiveCycle)
757755
// clang-format off
758756

759757
staticconstchar* xml_text =R"(
760-
<root BTCPP_format="4" main_tree_to_execute="MainTree">
761-
762-
<BehaviorTree ID="MainTree">
763-
<Sequence name="root">
764-
<AlwaysSuccess/>
765-
<SubTree ID="TreeA" />
766-
</Sequence>
767-
</BehaviorTree>
768-
769-
<BehaviorTree ID="TreeA">
770-
<Sequence name="root">
771-
<AlwaysSuccess/>
772-
<SubTree ID="TreeB" />
773-
</Sequence>
774-
</BehaviorTree>
775-
776-
<BehaviorTree ID="TreeB">
777-
<Sequence name="root">
778-
<AlwaysSuccess/>
779-
<SubTree ID="MainTree" />
780-
</Sequence>
781-
</BehaviorTree>
782-
</root>
758+
<root BTCPP_format="4" main_tree_to_execute="MainTree">
759+
<BehaviorTree ID="MainTree">
760+
<Sequence name="root">
761+
<AlwaysSuccess/>
762+
<SubTree ID="TreeA" />
763+
</Sequence>
764+
</BehaviorTree>
765+
766+
<BehaviorTree ID="TreeA">
767+
<Sequence name="root">
768+
<AlwaysSuccess/>
769+
<SubTree ID="TreeB" />
770+
</Sequence>
771+
</BehaviorTree>
772+
773+
<BehaviorTree ID="TreeB">
774+
<Sequence name="root">
775+
<AlwaysSuccess/>
776+
<SubTree ID="MainTree" />
777+
</Sequence>
778+
</BehaviorTree>
779+
</root>
783780
)";
784781

785782
// clang-format on
@@ -789,4 +786,3 @@ TEST(SubTree, RecursiveCycle)
789786

790787
ASSERT_ANY_THROW(auto tree = factory.createTreeFromText(xml_text));
791788
}
792-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp