Skip to content

Commit

Permalink
catkin C++17 string_view compatibility (#178)
Browse files Browse the repository at this point in the history
* Use static_cast instead of to_string()

* Fix to_string to static_cast
  • Loading branch information
FabianSchurig authored Apr 17, 2020
1 parent 4a8cf33 commit cc3f0d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blackboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const PortInfo* Blackboard::portInfo(const std::string &key)

void Blackboard::addSubtreeRemapping(StringView internal, StringView external)
{
internal_to_external_.insert( {internal.to_string(), external.to_string()} );
internal_to_external_.insert( {static_cast<std::string>(internal), static_cast<std::string>(external)} );
}

void Blackboard::debugMessage() const
Expand Down
2 changes: 1 addition & 1 deletion src/bt_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ std::vector<std::string> getCatkinLibraryPaths()
splitString(env_catkin_prefix_paths, os_pathsep);
for (BT::StringView catkin_prefix_path : catkin_prefix_paths)
{
filesystem::path path(catkin_prefix_path.to_string());
filesystem::path path(static_cast<std::string>(catkin_prefix_path));
filesystem::path lib("lib");
lib_paths.push_back((path / lib).str());
}
Expand Down

0 comments on commit cc3f0d9

Please sign in to comment.