diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2019-08-30 00:44:57 +0200 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2019-10-26 13:05:00 +0200 |
commit | 12ee71e4f732c883b33b9165c448302ea726186b (patch) | |
tree | 4c30f36d72de05fc3a2621dad08c363b75879821 /src/core/common.h | |
parent | e7cb489b2234df6da46317c8e5d092032ed6bdf6 (diff) |
audio7
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/common.h b/src/core/common.h index 920b7108..0a2e6768 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -121,7 +121,7 @@ public: CRGBA(void) { } CRGBA(uint8 r, uint8 g, uint8 b, uint8 a) : r(r), g(g), b(b), a(a) { } - CRGBA &CRGBA::operator =(const CRGBA &right) + CRGBA &operator =(const CRGBA &right) { this->r = right.r; this->g = right.g; @@ -142,7 +142,7 @@ public: return rwRGBA; } - CRGBA &CRGBA::operator =(const RwRGBA &right) + CRGBA &operator =(const RwRGBA &right) { this->r = right.red; this->g = right.green; @@ -197,8 +197,8 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) #define BIT(num) (1<<(num)) -#define max(a, b) (((a) > (b)) ? (a) : (b)) -#define min(a, b) (((a) < (b)) ? (a) : (b)) +auto max = [](auto a, auto b) { return ((a) > (b)) ? (a) : (b); }; +auto min = [](auto a, auto b) { return ((a) < (b)) ? (a) : (b); }; #define ABS(a) (((a) < 0) ? (-(a)) : (a)) #define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min))))) |