From c276b1c0bc50e3f66a8003ade48a79c669122dc7 Mon Sep 17 00:00:00 2001 From: blob1807 <12388588+blob1807@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:51:29 +1000 Subject: [PATCH] replace spaces with tabs --- core/encoding/json/marshal.odin | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index 9433d525e..f544070b2 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -51,8 +51,8 @@ Marshal_Options :: struct { // NOTE: This will temp allocate and sort a list for each map. sort_maps_by_key: bool, - // Output enum value's name instead of its underlineing value - use_enum_value_names: bool, + // Output enum value's name instead of its underlineing value + use_enum_value_names: bool, // Internal state indentation: int, @@ -405,23 +405,23 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err: case runtime.Type_Info_Enum: if !opt.use_enum_value_names || len(info.names) == 0 { - return marshal_to_writer(w, any{v.data, info.base.id}, opt) - } else { - enum_a := any{v.data, info.base.id} - u: runtime.Type_Info_Enum_Value + return marshal_to_writer(w, any{v.data, info.base.id}, opt) + } else { + enum_a := any{v.data, info.base.id} + u: runtime.Type_Info_Enum_Value - switch i in enum_a { - case int: u = runtime.Type_Info_Enum_Value(i) - case: panic("Invalid enum base type") - } + switch i in enum_a { + case int: u = runtime.Type_Info_Enum_Value(i) + case: panic("Invalid enum base type") + } - pos, found := slice.binary_search(info.values, u) - if found { - return marshal_to_writer(w, any(info.names[pos]), opt) - } else { - panic("Unable to find value in enum's values") - } - } + pos, found := slice.binary_search(info.values, u) + if found { + return marshal_to_writer(w, any(info.names[pos]), opt) + } else { + panic("Unable to find value in enum's values") + } + } case runtime.Type_Info_Bit_Set: is_bit_set_different_endian_to_platform :: proc(ti: ^runtime.Type_Info) -> bool {