From f7326c640690cf5cfee89340db5569ef9b44a652 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 15 Jan 2015 00:21:36 +0100 Subject: Using Arguments::None instead of storing a flag if no explicit arguments were given for validation --- src/core/common/Function.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/core/common/Function.cpp') diff --git a/src/core/common/Function.cpp b/src/core/common/Function.cpp index 6aedb7b..5a4359d 100644 --- a/src/core/common/Function.cpp +++ b/src/core/common/Function.cpp @@ -23,12 +23,9 @@ namespace ousia { Variant::arrayType &ValidatingFunction::validate(Variant::arrayType &args) const { - // If an argument descriptor was given, use it to validate the arguments. - // Throw any violation as exception. - if (checkArguments) { - ExceptionLogger logger; - arguments.validateArray(args, logger); - } + // Validate the given arguments. Throw any violation as exception. + ExceptionLogger logger; + arguments.validateArray(args, logger); return args; } } -- cgit v1.2.3