mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 04:38:16 +00:00
encoding/cbor: cleanup default temp allocator
This commit is contained in:
@@ -52,9 +52,8 @@ unmarshal_from_string :: proc(s: string, ptr: ^$T, flags := Decoder_Flags{}, all
|
||||
|
||||
unmarshal_from_decoder :: proc(d: Decoder, ptr: ^$T, allocator := context.allocator) -> (err: Unmarshal_Error) {
|
||||
d := d
|
||||
if d.max_pre_alloc <= 0 {
|
||||
d.max_pre_alloc = DEFAULT_MAX_PRE_ALLOC
|
||||
}
|
||||
|
||||
DECODE_PROGRESS_GUARD(&d)
|
||||
|
||||
err = _unmarshal_any_ptr(d, ptr, allocator=allocator)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user