mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-22 04:50:06 +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
|
# define LAIKA_FORCEINLINE __forceinline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MIN(a, b) \
|
LAIKA_FORCEINLINE int MIN(int a, int b) {
|
||||||
({ __typeof__ (a) _a = (a); \
|
return a < b ? a : b;
|
||||||
__typeof__ (b) _b = (b); \
|
}
|
||||||
_a < _b ? _a : _b; })
|
|
||||||
|
|
||||||
#define MAX(a, b) \
|
LAIKA_FORCEINLINE int MAX(int a, int b) {
|
||||||
({ __typeof__ (a) _a = (a); \
|
return a > b ? a : b;
|
||||||
__typeof__ (b) _b = (b); \
|
}
|
||||||
_a > _b ? _a : _b; })
|
|
||||||
|
|
||||||
struct sLaika_peer;
|
struct sLaika_peer;
|
||||||
struct sLaika_socket;
|
struct sLaika_socket;
|
||||||
|
Loading…
Reference in New Issue
Block a user