In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit c8385d32 authored by Carla Guillen Carias's avatar Carla Guillen Carias

Removing bug

parent 1a435282
......@@ -137,11 +137,30 @@ SMUCNGPerfConfigurator::~SMUCNGPerfConfigurator() {
}
bool endsWith (std::string const &fullString, std::string const &ending) {
if (fullString.length() >= ending.length()) {
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
} else {
return false;
}
if(ending.size() > fullString.size()){
return false;
}
std::size_t last_forward = fullString.find_last_of('/');
std::size_t last_greaterthan = fullString.find_last_of('>');
std::size_t max_pos;
if(last_greaterthan == std::string::npos){ //no >
if(last_forward == std::string::npos) { // no /
return fullString.compare(ending)==0;
} else { // we have /
max_pos = last_forward;
}
} else { // > is present
if(last_forward == std::string::npos) { // no /
max_pos = last_greaterthan;
} else {
max_pos = last_forward > last_greaterthan ? last_forward : last_greaterthan;
}
}
max_pos++; //increment so that we compare the next char.
if(max_pos < fullString.length()){
return 0 == fullString.compare(max_pos, fullString.size() - max_pos, ending);
}
return false;
}
void SMUCNGPerfConfigurator::sensorBase(SMUCSensorBase& s, CFG_VAL config) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment