From 33777ea0994f01c696b74677f4937fe2987552c9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 May 2015 00:24:33 +0300 Subject: Add opearator+ for InputAction and unsigned int. Signed-off-by: Andrei Karas --- src/input/inputactionoperators.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/input/inputactionoperators.cpp') diff --git a/src/input/inputactionoperators.cpp b/src/input/inputactionoperators.cpp index a2c0eb496..ef0c48d69 100644 --- a/src/input/inputactionoperators.cpp +++ b/src/input/inputactionoperators.cpp @@ -26,6 +26,12 @@ InputActionT operator+(InputActionT action, const int& i) return action; } +InputActionT operator+(InputActionT action, const unsigned int& i) +{ + action = static_cast(static_cast(action) + i); + return action; +} + int operator-(const InputActionT &action1, const InputActionT &action2) { return static_cast(action1) - static_cast(action2); -- cgit v1.2.3-70-g09d2