mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Replace x in &y Use &v in y syntax through core & vendor for switch/for statements
This commit is contained in:
@@ -19,7 +19,7 @@ import rnd "core:math/rand"
|
||||
int_destroy :: proc(integers: ..^Int) {
|
||||
integers := integers
|
||||
|
||||
for a in &integers {
|
||||
for a in integers {
|
||||
assert_if_nil(a)
|
||||
}
|
||||
#force_inline internal_int_destroy(..integers)
|
||||
@@ -408,7 +408,7 @@ clear_if_uninitialized_multi :: proc(args: ..^Int, allocator := context.allocato
|
||||
args := args
|
||||
assert_if_nil(..args)
|
||||
|
||||
for i in &args {
|
||||
for i in args {
|
||||
#force_inline internal_clear_if_uninitialized_single(i, allocator) or_return
|
||||
}
|
||||
return err
|
||||
@@ -435,7 +435,7 @@ int_init_multi :: proc(integers: ..^Int, allocator := context.allocator) -> (err
|
||||
assert_if_nil(..integers)
|
||||
|
||||
integers := integers
|
||||
for a in &integers {
|
||||
for a in integers {
|
||||
#force_inline internal_clear(a, true, allocator) or_return
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -1857,7 +1857,7 @@ internal_root_n :: proc { internal_int_root_n, }
|
||||
internal_int_destroy :: proc(integers: ..^Int) {
|
||||
integers := integers
|
||||
|
||||
for a in &integers {
|
||||
for &a in integers {
|
||||
if internal_int_allocated_cap(a) > 0 {
|
||||
mem.zero_slice(a.digit[:])
|
||||
free(&a.digit[0])
|
||||
@@ -2909,7 +2909,7 @@ internal_int_init_multi :: proc(integers: ..^Int, allocator := context.allocator
|
||||
context.allocator = allocator
|
||||
|
||||
integers := integers
|
||||
for a in &integers {
|
||||
for a in integers {
|
||||
internal_clear(a) or_return
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -137,7 +137,7 @@ rat_copy :: proc(dst, src: ^Rat, minimize := false, allocator := context.allocat
|
||||
internal_rat_destroy :: proc(rationals: ..^Rat) {
|
||||
rationals := rationals
|
||||
|
||||
for z in &rationals {
|
||||
for &z in rationals {
|
||||
internal_int_destroy(&z.a, &z.b)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ flux_tween_init :: proc(tween: ^Flux_Tween($T), duration: time.Duration) where i
|
||||
flux_update :: proc(flux: ^Flux_Map($T), dt: f64) where intrinsics.type_is_float(T) {
|
||||
clear(&flux.keys_to_be_deleted)
|
||||
|
||||
for key, tween in &flux.values {
|
||||
for key, &tween in flux.values {
|
||||
delay_remainder := f64(0)
|
||||
|
||||
// Update delay if necessary.
|
||||
|
||||
Reference in New Issue
Block a user