summaryrefslogtreecommitdiff
path: root/api/lib/numeric.h
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2023-02-05 13:21:30 +0000
committerAda Christine <adachristine18@gmail.com>2023-02-05 13:21:30 +0000
commit16ac52200a768d8f0e93896ec3fa174e825f2f24 (patch)
tree571ee64117b686c2060a2ab085f525805ab7d5ab /api/lib/numeric.h
parent0bfbbabeed6b53d7aa44f6df9b569e3bacb040e9 (diff)
fix broken
Diffstat (limited to 'api/lib/numeric.h')
-rw-r--r--api/lib/numeric.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/api/lib/numeric.h b/api/lib/numeric.h
index db6c777..2b724e0 100644
--- a/api/lib/numeric.h
+++ b/api/lib/numeric.h
@@ -1,16 +1,17 @@
#pragma once
+#pragma GCC diagnostic ignored "-Wgnu-statement-expression"
#define min(x, y) \
({ \
- typeof (x) _x = (x); \
- typeof (y) _y = (y); \
- _x > _y ? _x : _y; \
+ __typeof__ (x) _x = (x); \
+ __typeof__ (y) _y = (y); \
+ _x < _y ? _x : _y; \
})
#define max(x, y) \
({ \
- typeof (x) _x = (x); \
- typeof (y) _y = (y); \
- _x < _y ? _x : _y; \
+ __typeof__ (x) _x = (x); \
+ __typeof__ (y) _y = (y); \
+ _x > _y ? _x : _y; \
})