fix casts
parent
1baaf9a503
commit
bfb15f1c9f
|
@ -1,6 +1,6 @@
|
|||
pub const pthread_mutex_t = extern struct {
|
||||
inner: usize = ~usize(0),
|
||||
inner: usize = ~@as(usize, 0),
|
||||
};
|
||||
pub const pthread_cond_t = extern struct {
|
||||
inner: usize = ~usize(0),
|
||||
inner: usize = ~@as(usize, 0),
|
||||
};
|
||||
|
|
|
@ -548,7 +548,7 @@ pub fn intToEnum(comptime Tag: type, tag_int: var) IntToEnumError!Tag {
|
|||
pub fn fieldIndex(comptime T: type, comptime name: []const u8) ?comptime_int {
|
||||
inline for (fields(T)) |field, i| {
|
||||
if (mem.eql(u8, field.name, name))
|
||||
return comptime_int(i);
|
||||
return i;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -951,7 +951,7 @@ pub fn cap_valid(u8: x) bool {
|
|||
}
|
||||
|
||||
pub fn CAP_TO_MASK(cap: u8) u32 {
|
||||
return @as(u32, 1) << u5(cap & 31);
|
||||
return @as(u32, 1) << @intCast(u5, cap & 31);
|
||||
}
|
||||
|
||||
pub fn CAP_TO_INDEX(cap: u8) u8 {
|
||||
|
|
Loading…
Reference in New Issue