glfw: re-instate prong
Bring back the 'c.GLFW_NOT_INITIALIZED' prong in 'convertError', such that if it is ever passed that error code, we can differentiate it from just an invalid input; because it is a valid input, we just guarantee that it won't occur.
This commit is contained in:
parent
b35a7b4fad
commit
6127fa267f
1 changed files with 1 additions and 0 deletions
|
|
@ -84,6 +84,7 @@ pub const Error = error{
|
|||
fn convertError(e: c_int) Error!void {
|
||||
return switch (e) {
|
||||
c.GLFW_NO_ERROR => {},
|
||||
c.GLFW_NOT_INITIALIZED => unreachable,
|
||||
c.GLFW_NO_CURRENT_CONTEXT => Error.NoCurrentContext,
|
||||
c.GLFW_INVALID_ENUM => Error.InvalidEnum,
|
||||
c.GLFW_INVALID_VALUE => Error.InvalidValue,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue