Base: [skip ci] if array of reserved names is empty then return the suggested name in Base::Tools::getUniqueName

This commit is contained in:
wmayer
2022-12-30 16:35:52 +01:00
parent fd7f93499d
commit c038be8ff8

View File

@@ -72,6 +72,10 @@ struct string_comp
std::string Base::Tools::getUniqueName(const std::string& name, const std::vector<std::string>& names, int d)
{
if (names.empty()) {
return name;
}
// find highest suffix
std::string num_suffix;
for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); ++it) {