better 64-bit CHECK_IA
allows it to be lowered to (x>>48)==0, avoiding initializing a 64-bit constant
This commit is contained in:
parent
0b678bc274
commit
8c22564b41
2
src/h.h
2
src/h.h
@ -165,7 +165,7 @@ typedef size_t ux;
|
|||||||
#if USZ_64
|
#if USZ_64
|
||||||
typedef u64 usz;
|
typedef u64 usz;
|
||||||
#define USZ_MAX ((u64)(1ULL<<48))
|
#define USZ_MAX ((u64)(1ULL<<48))
|
||||||
#define CHECK_IA(IA,W) if((IA) > USZ_MAX) thrOOM()
|
#define CHECK_IA(IA,W) if((IA) >= USZ_MAX) thrOOM()
|
||||||
#else
|
#else
|
||||||
typedef u32 usz;
|
typedef u32 usz;
|
||||||
#define USZ_MAX ((u32)((1LL<<32)-1))
|
#define USZ_MAX ((u32)((1LL<<32)-1))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user