From 278545da00787d03dcc972ce0305d7701b3230e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 22 Jul 2026 09:42:12 +0200 Subject: [PATCH] Removed dead code (#299) Signed-off-by: Alejandro Hernandez Cordero (cherry picked from commit 0bf4e864eeb9dc91a130cecb8d87b77592d6ea87) --- pluginlib/include/pluginlib/class_loader_imp.hpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pluginlib/include/pluginlib/class_loader_imp.hpp b/pluginlib/include/pluginlib/class_loader_imp.hpp index 52c579e..71ff006 100644 --- a/pluginlib/include/pluginlib/class_loader_imp.hpp +++ b/pluginlib/include/pluginlib/class_loader_imp.hpp @@ -542,7 +542,6 @@ ClassLoader::getPackageFromPluginXMLFilePath(const std::string & plugin_xml_f // 1. Find nearest encasing package.xml // 2. Extract name of package from package.xml - std::string package_name; std::filesystem::path p(plugin_xml_file_path); std::filesystem::path parent = p.parent_path(); @@ -563,8 +562,6 @@ ClassLoader::getPackageFromPluginXMLFilePath(const std::string & plugin_xml_f return ""; } } - - return package_name; } template @@ -650,14 +647,12 @@ void ClassLoader::processSingleXMLPluginFile( throw pluginlib::InvalidXMLException( "XML Document '" + xml_file + "' has no Root Element. This likely means the XML is malformed or missing."); - return; } const char * config_value = config->Value(); if (nullptr == config_value) { throw pluginlib::InvalidXMLException( "XML Document '" + xml_file + "' has an invalid Root Element. This likely means the XML is malformed or missing."); - return; } if (!(strcmp(config_value, "library") == 0 || strcmp(config_value, "class_libraries") == 0)) @@ -665,7 +660,6 @@ void ClassLoader::processSingleXMLPluginFile( throw pluginlib::InvalidXMLException( "The XML document '" + xml_file + "' given to add must have either \"library\" or " "\"class_libraries\" as the root tag"); - return; } // Step into the filter list if necessary if (strcmp(config_value, "class_libraries") == 0) { @@ -789,7 +783,6 @@ template std::string ClassLoader::stripAllButFileFromPath(const std::string & path) /***************************************************************************/ { - std::string only_file; size_t c = path.find_last_of(getPathSeparator()); if (std::string::npos == c) { return path;