simpler o2bu
This commit is contained in:
parent
a52260715e
commit
ea5abeff18
2
src/h.h
2
src/h.h
@ -411,7 +411,7 @@ static usz o2su (B x) { return (usz)x.f; }
|
||||
static f64 o2fu (B x) { return x.f; }
|
||||
static i64 o2i64u(B x) { return (i64)x.f; }
|
||||
static bool o2b (B x) { i32 t=(i32)x.f; if(t!=x.f || t!=0&t!=1)thrM("Expected boolean"); return t; }
|
||||
static bool o2bu (B x) { return o2s(x); }
|
||||
static bool o2bu (B x) { return (x.u<<1) != 0; }
|
||||
static bool q_bit(B x) { return isNum(x) & (x.f==0 | x.f==1); }
|
||||
static bool q_c8 (B x) { return isC32(x) && ((u32)x.u) == ((u8 )x.u); }
|
||||
static bool q_c16(B x) { return isC32(x) && ((u32)x.u) == ((u16)x.u); }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user