mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 04:38:16 +00:00
Convert core:compress and core:image error checks to new union comparison.
No more need for `is_kind(err, Error_Value)`, just test err == Error_Value.
This commit is contained in:
@@ -3,12 +3,6 @@ package compress
|
||||
import "core:io"
|
||||
import "core:image"
|
||||
|
||||
// Error helper, e.g. is_kind(err, General_Error.OK);
|
||||
is_kind :: proc(u: $U, x: $V) -> bool {
|
||||
v, ok := u.(V);
|
||||
return ok && v == x;
|
||||
}
|
||||
|
||||
Error :: union {
|
||||
General_Error,
|
||||
Deflate_Error,
|
||||
|
||||
Reference in New Issue
Block a user