Added += and -= operators

This commit is contained in:
jwellbelove 2017-02-15 18:03:31 +00:00
parent aca086b22d
commit 09705bdd7f

View File

@ -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;