From 09705bdd7f99584fa73d49f9c22aca35a81487a4 Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Wed, 15 Feb 2017 18:03:31 +0000 Subject: [PATCH] Added += and -= operators --- src/debug_count.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/debug_count.h b/src/debug_count.h index ac545f86..dd6dfe32 100644 --- a/src/debug_count.h +++ b/src/debug_count.h @@ -74,6 +74,18 @@ namespace etl return *this; } + inline debug_count& operator +=(int32_t n) + { + count += n; + return *this; + } + + inline debug_count& operator -=(int32_t n) + { + count -= n; + return *this; + } + inline operator int32_t() { return count; @@ -101,6 +113,16 @@ namespace etl return *this; } + inline debug_count& operator +=(int32_t /*n*/) + { + return *this; + } + + inline debug_count& operator -=(int32_t /*n*/) + { + return *this; + } + inline operator int32_t() { return 0;