encoding/cbor: cleanup default temp allocator

This commit is contained in:
Laytan Laats
2024-03-04 17:26:19 +01:00
parent 46b58ad48d
commit cb8bb8bfd8
4 changed files with 77 additions and 35 deletions
+2 -3
View File
@@ -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)