diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-02-15 23:42:46 +0900 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-02-15 23:43:39 +0900 |
| commit | 22903931ddb5bae013c01ab73ebcf2dc0da5cc30 (patch) | |
| tree | b52e2c34578a662b063ce22c8264c2a9eac05b1d /src/input.zig | |
| parent | 7c1b42634198dbc996acf5e920e19790aebc4e04 (diff) | |
| download | gfz-22903931ddb5bae013c01ab73ebcf2dc0da5cc30.tar.gz | |
Port to Zig 0.10
Diffstat (limited to 'src/input.zig')
| -rw-r--r-- | src/input.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input.zig b/src/input.zig index 873265f..9c2396c 100644 --- a/src/input.zig +++ b/src/input.zig @@ -1,5 +1,5 @@ // Input constants -// Copyright (C) 2021 Nguyễn Gia Phong +// Copyright (C) 2021, 2023 Nguyễn Gia Phong // // This file is part of gfz. // @@ -17,7 +17,7 @@ // along with gfz. If not, see <https://www.gnu.org/licenses/>. const Int = std.meta.Int; -const EnumField = std.builtin.TypeInfo.EnumField; +const EnumField = std.builtin.Type.EnumField; const endian = @import("builtin").target.cpu.arch.endian(); const c = @import("cimport.zig"); const std = @import("std"); @@ -88,7 +88,7 @@ pub const Mods = packed struct { const integer = @intCast(MaskInt, mask); return @bitCast(Mods, Mask{ .integer = switch (endian) { - .Big => @bitReverse(MaskInt, integer), + .Big => @bitReverse(integer), .Little => integer, }, }); @@ -98,7 +98,7 @@ pub const Mods = packed struct { pub fn toInt(self: Mods) c_int { const integer = @bitCast(Mask, self).integer; return @intCast(c_int, switch (endian) { - .Big => @bitReverse(MaskInt, integer), + .Big => @bitReverse(integer), .Little => integer, }); } |
