mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 14:29:42 -05:00
Make the check for whitespaces and dots in identifiers fatal also in non-Debug builds
This commit is contained in:
@@ -377,15 +377,9 @@ void PropertyOwner::removePropertySubOwner(openspace::properties::PropertyOwner&
|
||||
}
|
||||
|
||||
void PropertyOwner::setIdentifier(std::string identifier) {
|
||||
ghoul_precondition(
|
||||
_identifier.find_first_of("\t\n ") == std::string::npos,
|
||||
"Identifier must not contain any whitespaces"
|
||||
);
|
||||
ghoul_precondition(
|
||||
_identifier.find_first_of('.') == std::string::npos,
|
||||
"Identifier must not contain any dots"
|
||||
);
|
||||
|
||||
if (identifier.find_first_of(". \t\n") != std::string::npos) {
|
||||
throw ghoul::RuntimeError("Identifier must not contain any dots or whitespaces");
|
||||
}
|
||||
_identifier = std::move(identifier);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user