summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-08-30 00:44:57 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-10-26 13:05:00 +0200
commit12ee71e4f732c883b33b9165c448302ea726186b (patch)
tree4c30f36d72de05fc3a2621dad08c363b75879821 /src/core
parentMerge pull request #253 from erorcun/erorcun (diff)
downloadre3-12ee71e4f732c883b33b9165c448302ea726186b.tar
re3-12ee71e4f732c883b33b9165c448302ea726186b.tar.gz
re3-12ee71e4f732c883b33b9165c448302ea726186b.tar.bz2
re3-12ee71e4f732c883b33b9165c448302ea726186b.tar.lz
re3-12ee71e4f732c883b33b9165c448302ea726186b.tar.xz
re3-12ee71e4f732c883b33b9165c448302ea726186b.tar.zst
re3-12ee71e4f732c883b33b9165c448302ea726186b.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/common.h8
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)))))