Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 086e92f

Browse files
Merge pull request BehaviorTree#58 from v-lopez/add-to-str-str
Allow toStr from string
2 parents 2a55640 + 6eb645e commit 086e92f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/behaviortree_cpp/basic_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ std::string toStr(T value)
127127
return std::to_string(value);
128128
}
129129

130+
std::string toStr(std::string value);
131+
130132
template<> std::string toStr<BT::NodeStatus>(BT::NodeStatus status);
131133

132134
/**

src/basic_types.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ std::string toStr<NodeStatus>(NodeStatus status)
2222
return "";
2323
}
2424

25+
std::string toStr(std::string value)
26+
{
27+
return value;
28+
}
29+
2530
std::string toStr(NodeStatus status, bool colored)
2631
{
2732
if (!colored)

0 commit comments

Comments
 (0)