[core] convert CompoundExpressionRegistry to constexpr hash map

This commit is contained in:
Konstantin Käfer
2018-12-03 21:43:43 +02:00
parent 2b9f3aad9a
commit 64559a255b
5 changed files with 422 additions and 120 deletions

View File

@@ -16,8 +16,7 @@ bool isExpression(const Convertible& value) {
optional<std::string> name = toString(arrayMember(value, 0));
if (!name) return false;
return getExpression(*name) ||
(CompoundExpressionRegistry::definitions.find(*name) != CompoundExpressionRegistry::definitions.end());
return isExpression(*name) || CompoundExpression::exists(*name);
}