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.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/core/common/Function.hpp') diff --git a/src/core/common/Function.hpp b/src/core/common/Function.hpp index adfc9bb..dd6e5ec 100644 --- a/src/core/common/Function.hpp +++ b/src/core/common/Function.hpp @@ -128,23 +128,17 @@ private: */ Arguments arguments; - /** - * Set to true if any arguments for checking were given in the constructor. - * If set to false, no argument checks are performed. - */ - bool checkArguments; - protected: /** * Default constructor. Disables validation, all arguments are allowed. */ - ValidatingFunction() : checkArguments(false){}; + ValidatingFunction() : arguments(Arguments::None){}; /** * Default constructor. Disables validation, all arguments are allowed. */ ValidatingFunction(Arguments arguments) - : arguments(std::move(arguments)), checkArguments(true){}; + : arguments(std::move(arguments)) {}; /** * Function which cares about validating a set of arguments. -- cgit v1.2.3