sys: Improved ScopeGuard syntax a lot

This commit is contained in:
WerWolv
2021-03-31 22:54:43 +02:00
parent a2c80e3fd6
commit 2f19ff768d
8 changed files with 70 additions and 50 deletions

View File

@@ -81,7 +81,10 @@ namespace hex::lang {
return { };
}
SCOPE_EXIT( for(auto &node : ast.value()) delete node; );
ON_SCOPE_EXIT {
for(auto &node : ast.value())
delete node;
};
auto validatorResult = this->m_validator->validate(ast.value());
if (!validatorResult) {