Browse Source

Cleanup of json.clone_value

Karl Zylinski 1 year ago
parent
commit
75cb2c68cc
1 changed files with 2 additions and 4 deletions
  1. 2 4
      core/encoding/json/types.odin

+ 2 - 4
core/encoding/json/types.odin

@@ -119,10 +119,8 @@ clone_value :: proc(value: Value, allocator := context.allocator) -> Value {
 		}
 		}
 		return new_o
 		return new_o
 	case Array:
 	case Array:
-		len := len(v)
-		new_a := make(Array, len)
-		vv := v
-		for elem, idx in vv {
+		new_a := make(Array, len(v))
+		for elem, idx in v {
 			new_a[idx] = clone_value(elem)
 			new_a[idx] = clone_value(elem)
 		}
 		}
 		return new_a
 		return new_a