mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
png + compress: Rearrange error unions.
This commit is contained in:
@@ -9,9 +9,8 @@ package compress
|
||||
*/
|
||||
|
||||
import "core:io"
|
||||
import "core:image"
|
||||
import "core:bytes"
|
||||
import "core:mem"
|
||||
import "core:runtime"
|
||||
|
||||
/*
|
||||
These settings bound how much compression algorithms will allocate for their output buffer.
|
||||
@@ -48,16 +47,12 @@ when size_of(uintptr) == 8 {
|
||||
|
||||
Error :: union {
|
||||
General_Error,
|
||||
mem.Allocator_Error,
|
||||
Deflate_Error,
|
||||
ZLIB_Error,
|
||||
GZIP_Error,
|
||||
ZIP_Error,
|
||||
/*
|
||||
This is here because png.load will return a this type of error union,
|
||||
as it may involve an I/O error, a Deflate error, etc.
|
||||
*/
|
||||
image.Error,
|
||||
|
||||
runtime.Allocator_Error,
|
||||
}
|
||||
|
||||
General_Error :: enum {
|
||||
@@ -71,7 +66,6 @@ General_Error :: enum {
|
||||
Incompatible_Options,
|
||||
Unimplemented,
|
||||
|
||||
|
||||
/*
|
||||
Memory errors
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user