File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ pub fn (mut f File) read_struct[T](mut t T) ! {
509509 if ! f.is_opened {
510510 return error_file_not_opened ()
511511 }
512- tsize := int (sizeof (* t ))
512+ tsize := int (sizeof (T ))
513513 if tsize == 0 {
514514 return error_size_of_type_0 ()
515515 }
@@ -525,7 +525,7 @@ pub fn (mut f File) read_struct_at[T](mut t T, pos u64) ! {
525525 if ! f.is_opened {
526526 return error_file_not_opened ()
527527 }
528- tsize := int (sizeof (* t ))
528+ tsize := int (sizeof (T ))
529529 if tsize == 0 {
530530 return error_size_of_type_0 ()
531531 }
Original file line number Diff line number Diff line change @@ -490,7 +490,7 @@ fn (mut decoder Decoder) decode_value[T](mut val T) ! {
490490 if struct_info.value_kind == .string {
491491 val.from_json_string (decoder.json[struct_info.position + 1 ..struct_info.position +
492492 struct_info.length - 1 ]) or {
493- decoder.decode_error ('${typeof (* val ).name }: ${err .msg ()}' )!
493+ decoder.decode_error ('${typeof (val ).name }: ${err .msg ()}' )!
494494 }
495495 if decoder.current_node != unsafe { nil } {
496496 decoder.current_node = decoder.current_node.next
@@ -505,7 +505,7 @@ fn (mut decoder Decoder) decode_value[T](mut val T) ! {
505505 if struct_info.value_kind == .number {
506506 val.from_json_number (decoder.json[struct_info.position..struct_info.position +
507507 struct_info.length]) or {
508- decoder.decode_error ('${typeof (* val ).name }: ${err .msg ()}' )!
508+ decoder.decode_error ('${typeof (val ).name }: ${err .msg ()}' )!
509509 }
510510 if decoder.current_node != unsafe { nil } {
511511 decoder.current_node = decoder.current_node.next
You can’t perform that action at this time.
0 commit comments