diff options
Diffstat (limited to 'impl/Operator.hpp')
-rw-r--r-- | impl/Operator.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/impl/Operator.hpp b/impl/Operator.hpp index 71a1e68..2c5af75 100644 --- a/impl/Operator.hpp +++ b/impl/Operator.hpp @@ -59,10 +59,13 @@ struct Constant : public Operator<T> { }; template<typename T> -struct Increment: public Operator<T> { +struct Addition: public Operator<T> { + Addition(int i) : _value(i) { } T operator() (const std::vector< Expression<T>* >& args, const VariableAssignment<T>& ass) const { - return (*args[0])(ass) + 1; + return (*args[0])(ass) + _value; } + private: + int _value; }; #include "VariableAssignment.hpp" |