glfw: Remove 'NotInitialized' error

This commit is contained in:
InKryption 2021-11-21 20:15:41 +01:00 committed by Stephen Gutekanst
parent 42f0d15584
commit 9f241b5109

View file

@ -4,12 +4,6 @@ const c = @import("c.zig").c;
/// Errors that GLFW can produce.
pub const Error = error{
/// GLFW has not been initialized.
///
/// This occurs if a GLFW function was called that must not be called unless the library is
/// initialized.
NotInitialized,
/// No context is current for this thread.
///
/// This occurs if a GLFW function was called that needs and operates on the current OpenGL or
@ -90,7 +84,6 @@ pub const Error = error{
fn convertError(e: c_int) Error!void {
return switch (e) {
c.GLFW_NO_ERROR => {},
c.GLFW_NOT_INITIALIZED => Error.NotInitialized,
c.GLFW_NO_CURRENT_CONTEXT => Error.NoCurrentContext,
c.GLFW_INVALID_ENUM => Error.InvalidEnum,
c.GLFW_INVALID_VALUE => Error.InvalidValue,