From 16ae61c9084fc9377f060f01529c4b52be2ad82a Mon Sep 17 00:00:00 2001 From: Steve Macenski Date: Fri, 27 Oct 2023 11:46:14 -0700 Subject: [PATCH] Fix wShadow compile warning (#250) --- pluginlib/include/pluginlib/class_loader_imp.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pluginlib/include/pluginlib/class_loader_imp.hpp b/pluginlib/include/pluginlib/class_loader_imp.hpp index a41790b..89578e6 100644 --- a/pluginlib/include/pluginlib/class_loader_imp.hpp +++ b/pluginlib/include/pluginlib/class_loader_imp.hpp @@ -488,12 +488,12 @@ std::string ClassLoader::getClassLibraryPath(const std::string & lookup_name) RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader", "Iterating through all possible paths where %s could be located...", library_name.c_str()); - for (auto it = paths_to_try.begin(); it != paths_to_try.end(); it++) { - RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader", "Checking path %s ", it->c_str()); - if (rcpputils::fs::exists(*it)) { + for (auto path_it = paths_to_try.begin(); path_it != paths_to_try.end(); path_it++) { + RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader", "Checking path %s ", path_it->c_str()); + if (rcpputils::fs::exists(*path_it)) { RCUTILS_LOG_DEBUG_NAMED("pluginlib.ClassLoader", "Library %s found at explicit path %s.", - library_name.c_str(), it->c_str()); - return *it; + library_name.c_str(), path_it->c_str()); + return *path_it; } } std::ostringstream error_msg;