From 9c6b330ba63320511b5031853bff9c3f621019ae Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Cordero Date: Fri, 17 Jul 2026 11:18:27 +0200 Subject: [PATCH] Removed dead code Signed-off-by: Alejandro Hernandez Cordero --- 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;