(#1010) Make extrema functions inlinable
parent
fe589eb53e
commit
f31fad1b98
|
@ -129,7 +129,6 @@ add_executable(nothing
|
|||
src/game/sprite_font.c
|
||||
src/game/sprite_font.h
|
||||
src/main.c
|
||||
src/math/extrema.c
|
||||
src/math/extrema.h
|
||||
src/math/mat3x3.c
|
||||
src/math/mat3x3.h
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#include <stdlib.h>
|
||||
#include "./extrema.h"
|
||||
|
||||
int64_t max_int64(int64_t a, int64_t b)
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
size_t max_size_t(size_t a, size_t b)
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
|
@ -6,7 +6,16 @@
|
|||
// WARNING! Any attempts to "generalize" or "improve" this translation
|
||||
// unit will result in an instantly closed Pull Request without any
|
||||
// further discussion.
|
||||
int64_t max_int64(int64_t a, int64_t b);
|
||||
size_t max_size_t(size_t a, size_t b);
|
||||
static inline
|
||||
int64_t max_int64(int64_t a, int64_t b)
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
static inline
|
||||
size_t max_size_t(size_t a, size_t b)
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
#endif // EXTREMA_H_
|
||||
|
|
Loading…
Reference in New Issue