Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions pluginlib/include/pluginlib/class_loader_imp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ ClassLoader<T>::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();

Expand All @@ -563,8 +562,6 @@ ClassLoader<T>::getPackageFromPluginXMLFilePath(const std::string & plugin_xml_f
return "";
}
}

return package_name;
}

template<class T>
Expand Down Expand Up @@ -650,22 +647,19 @@ void ClassLoader<T>::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))
{
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) {
Expand Down Expand Up @@ -789,7 +783,6 @@ template<class T>
std::string ClassLoader<T>::stripAllButFileFromPath(const std::string & path)
/***************************************************************************/
{
std::string only_file;
size_t c = path.find_last_of(getPathSeparator());
if (std::string::npos == c) {
return path;
Expand Down