Skip to content

Commit

Permalink
add long long to generic min/max (fix macos build?)
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Aug 3, 2024
1 parent f8c94da commit 6cda125
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ww/utils/mathutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
unsigned long long: maxULL, \
unsigned long int: maxULInt, \
unsigned int: maxUInt, \
long long: maxLL, \
signed long int: maxSLInt, \
int: maxInt, \
double: maxDouble)(a, b)
Expand All @@ -36,6 +37,12 @@ static inline unsigned int maxUInt(unsigned int a, unsigned int b)
{
return a > b ? a : b;
}

static inline long long maxLL(long long a, long long b)
{
return a > b ? a : b;
}

static inline signed long int maxSLInt(signed long int a, signed long int b)
{
return a > b ? a : b;
Expand All @@ -61,6 +68,7 @@ static inline long maxLong(long a, long b)
unsigned long long: minULL, \
unsigned long int: minULInt, \
unsigned int: minUInt, \
long long: minLL, \
signed long int: minSLInt, \
int: minInt, \
double: minDouble)(a, b)
Expand All @@ -80,6 +88,11 @@ static inline unsigned int minUInt(unsigned int a, unsigned int b)
return a < b ? a : b;
}

static inline long long minLL(long long a, long long b)
{
return a < b ? a : b;
}

static inline signed long int minSLInt(signed long int a, signed long int b)
{
return a < b ? a : b;
Expand Down

0 comments on commit 6cda125

Please sign in to comment.