From 83f28e462d4d04c075bc146af5a8edbf623827bd Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sun, 15 Apr 2018 00:06:19 -0700 Subject: [PATCH] move catkinFindLib implementation from anonymous namespace to getCatkinLibraryPaths --- .../include/pluginlib/class_loader_imp.hpp | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/pluginlib/include/pluginlib/class_loader_imp.hpp b/pluginlib/include/pluginlib/class_loader_imp.hpp index 1d893647..43b3a651 100644 --- a/pluginlib/include/pluginlib/class_loader_imp.hpp +++ b/pluginlib/include/pluginlib/class_loader_imp.hpp @@ -63,27 +63,6 @@ const std::string os_pathsep(";"); // NOLINT const std::string os_pathsep(":"); // NOLINT #endif -namespace -{ -std::vector catkinFindLib() -{ - std::vector lib_paths; - const char * env = std::getenv("CMAKE_PREFIX_PATH"); - if (env) { - std::string env_catkin_prefix_paths(env); - std::vector catkin_prefix_paths; - boost::split(catkin_prefix_paths, env_catkin_prefix_paths, boost::is_any_of(os_pathsep)); - BOOST_FOREACH(std::string catkin_prefix_path, catkin_prefix_paths) { - boost::filesystem::path path(catkin_prefix_path); - boost::filesystem::path lib("lib"); - lib_paths.push_back((path / lib).string()); - } - } - return lib_paths; -} - -} // namespace - namespace pluginlib { template @@ -323,7 +302,19 @@ template std::vector ClassLoader::getCatkinLibraryPaths() /***************************************************************************/ { - return catkinFindLib(); + std::vector lib_paths; + const char * env = std::getenv("CMAKE_PREFIX_PATH"); + if (env) { + std::string env_catkin_prefix_paths(env); + std::vector catkin_prefix_paths; + boost::split(catkin_prefix_paths, env_catkin_prefix_paths, boost::is_any_of(os_pathsep)); + BOOST_FOREACH(std::string catkin_prefix_path, catkin_prefix_paths) { + boost::filesystem::path path(catkin_prefix_path); + boost::filesystem::path lib("lib"); + lib_paths.push_back((path / lib).string()); + } + } + return lib_paths; } template