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

Skip to content

Allow toStr from string #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/behaviortree_cpp/basic_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ std::string toStr(T value)
return std::to_string(value);
}

std::string toStr(std::string value);

template<> std::string toStr<BT::NodeStatus>(BT::NodeStatus status);

/**
Expand Down
5 changes: 5 additions & 0 deletions src/basic_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ std::string toStr<NodeStatus>(NodeStatus status)
return "";
}

std::string toStr(std::string value)
{
return value;
}

std::string toStr(NodeStatus status, bool colored)
{
if (!colored)
Expand Down