glfw: Eliminate InvalidEnum

This commit is contained in:
InKryption 2021-11-23 23:16:56 +01:00 committed by Stephen Gutekanst
parent a465d2e021
commit fb0c695bd1
5 changed files with 31 additions and 64 deletions

View file

@ -84,8 +84,6 @@ pub inline fn createStandard(shape: Shape) Error!Cursor {
internal_debug.assertInitialized();
const cursor = c.glfwCreateStandardCursor(@intCast(c_int, @enumToInt(shape)));
getError() catch |err| return switch (err) {
// should be unreachable given that only the values in 'Shape' are available, unless the user explicitly gives us a bad value via casting
Error.InvalidEnum => unreachable,
Error.PlatformError => err,
else => unreachable,
};