From de3a6479cf0985362ca0b28acd62189dd2bd75ba Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 7 Dec 2023 10:56:49 +0100 Subject: [PATCH] Updated negation --- include/Range.h | 2 +- src/Range.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Range.h b/include/Range.h index 8f8834e..f66bcf0 100644 --- a/include/Range.h +++ b/include/Range.h @@ -10,7 +10,7 @@ public: inline Range16 operator-(Range16 a); inline Range16 operator+(Range16 a); - inline Range16 operator-(); + inline Range16 &operator-(); inline bool operator==(Range16 a); inline bool operator!=(Range16 a); diff --git a/src/Range.cpp b/src/Range.cpp index 3e3661e..af23906 100644 --- a/src/Range.cpp +++ b/src/Range.cpp @@ -28,7 +28,7 @@ Range16::Range16(short s) { Range16 Range16::operator-(Range16 a) { this->range - a.range; }; Range16 Range16::operator+(Range16 a) { this->range + a.range; }; -Range16 Range16::operator-() { -this->range; } +Range16 &Range16::operator-() { -this->range; } bool Range16::operator==(Range16 a) { this->range == a.range; } bool Range16::operator!=(Range16 a) { return (this->range != a.range); }