parent
e7e414c46d
commit
7a36a4644e
|
@ -58,6 +58,9 @@ void FaceRegistry::register_alias(const String& name, const String& facedesc,
|
||||||
[](char c){ return not isalnum(c); }))
|
[](char c){ return not isalnum(c); }))
|
||||||
throw runtime_error(format("invalid alias name: '{}'", name));
|
throw runtime_error(format("invalid alias name: '{}'", name));
|
||||||
|
|
||||||
|
if (name == facedesc)
|
||||||
|
throw runtime_error(format("cannot alias face '{}' to itself", name));
|
||||||
|
|
||||||
FaceOrAlias& alias = m_aliases[name];
|
FaceOrAlias& alias = m_aliases[name];
|
||||||
auto it = m_aliases.find(facedesc);
|
auto it = m_aliases.find(facedesc);
|
||||||
if (it != m_aliases.end())
|
if (it != m_aliases.end())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user