Skip to content

Commit ff5df2c

Browse files
committed
cgen: small cleanup in comments (init: it -> init: index)
1 parent 4007c6c commit ff5df2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vlib/v/gen/c/array.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@ fn (mut g Gen) struct_has_array_or_map_field(elem_typ ast.Type) bool {
194194
return false
195195
}
196196

197-
// `[]int{len: 6, cap: 10, init: it * it}`
197+
// `[]int{len: 6, cap: 10, init: index * index}`
198198
fn (mut g Gen) array_init_with_fields(node ast.ArrayInit, elem_type Type, is_amp bool, shared_styp string, var_name string) {
199199
elem_styp := g.typ(elem_type.typ)
200200
noscan := g.check_noscan(elem_type.typ)
201201
is_default_array := elem_type.unaliased_sym.kind == .array && node.has_default
202202
is_default_map := elem_type.unaliased_sym.kind == .map && node.has_default
203203
needs_more_defaults := node.has_len && (g.struct_has_array_or_map_field(elem_type.typ)
204204
|| elem_type.unaliased_sym.kind in [.array, .map])
205-
if node.has_index { // []int{len: 6, init: it * it} when variable it is used in init expression
205+
if node.has_index { // []int{len: 6, init: index * index} when variable it is used in init expression
206206
g.inside_lambda = true
207207
mut tmp := g.new_tmp_var()
208208
mut s := ''

0 commit comments

Comments
 (0)