mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-21 12:40:04 +00:00
Lib: MAX & MIN are now inlined functions
This commit is contained in:
parent
3e60cc3c0f
commit
f62363d4e4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user