From 903d2dd1485e9ff02df1926be9aa3899d96f9cd7 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 8 Aug 2018 21:57:40 +0100 Subject: [PATCH] Removed typed += & -= operators and replaced with templates. --- include/etl/debug_count.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/include/etl/debug_count.h b/include/etl/debug_count.h index b603b00c..66b40530 100644 --- a/include/etl/debug_count.h +++ b/include/etl/debug_count.h @@ -84,25 +84,15 @@ 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 debug_count& operator +=(size_t n) + template + inline debug_count& operator +=(T n) { count += int32_t(n); return *this; } - inline debug_count& operator -=(size_t n) + template + inline debug_count& operator -=(T n) { count -= int32_t(n); return *this;