[all] move min/max and upcast macros into common/util.h

This commit is contained in:
Geoffrey McRae committed 2022-01-05 19:41:57 +11:00
1 parent ebf20dd108
commit 0d27092ef5
5 files changed
+36 -12

No files matched your search

+1 -3
View File
@@ -19,12 +19,10 @@
*/
#include "common/rects.h"
#include "common/util.h"
#include <stdlib.h>
#define min(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
#define max(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; })
struct Corner
{
int x;