1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-11-21 20:40:05 +00:00

Lib: MAX & MIN are now inlined functions

This commit is contained in:
CPunch 2022-05-18 14:12:20 -05:00
parent 3e60cc3c0f
commit f62363d4e4

View File

@ -22,15 +22,13 @@
# define LAIKA_FORCEINLINE __forceinline
#endif
#define MIN(a, b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; })
LAIKA_FORCEINLINE int MIN(int a, int b) {
return a < b ? a : b;
}
#define MAX(a, b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
LAIKA_FORCEINLINE int MAX(int a, int b) {
return a > b ? a : b;
}
struct sLaika_peer;
struct sLaika_socket;