diff options
| author | gingerBill <bill@gingerbill.org> | 2022-05-14 15:01:17 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-05-14 15:01:17 +0100 |
| commit | 4e080057fb0f24e66bb6ad4eccb931f1f325da9b (patch) | |
| tree | 7d72e1255bb8029ddfafbd99d2d5063616d6990a | |
| parent | 9c1f270bd56e367a34691517daa11194d2ef14e9 (diff) | |
Rename `load_from_buffer` to `load_from_bytes`
| -rw-r--r-- | core/image/netpbm/netpbm.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/image/netpbm/netpbm.odin b/core/image/netpbm/netpbm.odin index 83c8a2f59..bfaf49fc6 100644 --- a/core/image/netpbm/netpbm.odin +++ b/core/image/netpbm/netpbm.odin @@ -28,7 +28,7 @@ BINARY :: Formats{.P4, .P5, .P6} + PAM + PFM load :: proc { load_from_file, - load_from_buffer, + load_from_bytes, } load_from_file :: proc(filename: string, allocator := context.allocator) -> (img: ^Image, err: Error) { @@ -40,10 +40,10 @@ load_from_file :: proc(filename: string, allocator := context.allocator) -> (img return } - return load_from_buffer(data) + return load_from_bytes(data) } -load_from_buffer :: proc(data: []byte, allocator := context.allocator) -> (img: ^Image, err: Error) { +load_from_bytes :: proc(data: []byte, allocator := context.allocator) -> (img: ^Image, err: Error) { context.allocator = allocator img = new(Image) @@ -753,7 +753,7 @@ autoselect_pbm_format_from_image :: proc(img: ^Image, prefer_binary := true, for @(init, private) _register :: proc() { loader :: proc(data: []byte, options: image.Options, allocator: mem.Allocator) -> (img: ^Image, err: Error) { - return load_from_buffer(data, allocator) + return load_from_bytes(data, allocator) } image.register_loader(.PBM, loader) image.register_loader(.PGM, loader) |