update to latest Zig (zig fmt)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
419d82d5fd
commit
29964c99bb
39 changed files with 156 additions and 156 deletions
|
|
@ -150,7 +150,7 @@ pub const Key = enum(c_int) {
|
|||
menu = cc.GLFW_KEY_MENU,
|
||||
|
||||
pub inline fn last() Key {
|
||||
return @intToEnum(Key, cc.GLFW_KEY_LAST);
|
||||
return @enumFromInt(Key, cc.GLFW_KEY_LAST);
|
||||
}
|
||||
|
||||
/// Returns the layout-specific name of the specified printable key.
|
||||
|
|
@ -215,7 +215,7 @@ pub const Key = enum(c_int) {
|
|||
/// see also: input_key_name
|
||||
pub inline fn getName(self: Key, scancode: i32) ?[:0]const u8 {
|
||||
internal_debug.assertInitialized();
|
||||
const name_opt = cc.glfwGetKeyName(@enumToInt(self), @intCast(c_int, scancode));
|
||||
const name_opt = cc.glfwGetKeyName(@intFromEnum(self), @intCast(c_int, scancode));
|
||||
return if (name_opt) |name|
|
||||
std.mem.span(@ptrCast([*:0]const u8, name))
|
||||
else
|
||||
|
|
@ -237,7 +237,7 @@ pub const Key = enum(c_int) {
|
|||
/// @thread_safety This function may be called from any thread.
|
||||
pub inline fn getScancode(self: Key) i32 {
|
||||
internal_debug.assertInitialized();
|
||||
return cc.glfwGetKeyScancode(@enumToInt(self));
|
||||
return cc.glfwGetKeyScancode(@intFromEnum(self));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue