aboutsummaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-06-26 15:42:57 +0100
committergingerBill <bill@gingerbill.org>2023-06-26 15:42:57 +0100
commit3dec55f009da4293aca870d50f7b15668c4bba7c (patch)
tree5a17ea392dd5795831e5104c7c8c5e3496356940 /core/math
parent00d60e28c2a3e3e3a2e8bf7617bd62c0f9b1aae8 (diff)
Replace `x in &y` Use `&v in y` syntax through core & vendor for `switch`/`for` statements
Diffstat (limited to 'core/math')
-rw-r--r--core/math/big/helpers.odin6
-rw-r--r--core/math/big/internal.odin4
-rw-r--r--core/math/big/rat.odin2
-rw-r--r--core/math/ease/ease.odin2
4 files changed, 7 insertions, 7 deletions
diff --git a/core/math/big/helpers.odin b/core/math/big/helpers.odin
index 6c4b5dd01..a4313a244 100644
--- a/core/math/big/helpers.odin
+++ b/core/math/big/helpers.odin
@@ -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
diff --git a/core/math/big/internal.odin b/core/math/big/internal.odin
index 13aa96bef..968a26f8f 100644
--- a/core/math/big/internal.odin
+++ b/core/math/big/internal.odin
@@ -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
diff --git a/core/math/big/rat.odin b/core/math/big/rat.odin
index c3efc30aa..35618affb 100644
--- a/core/math/big/rat.odin
+++ b/core/math/big/rat.odin
@@ -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)
}
}
diff --git a/core/math/ease/ease.odin b/core/math/ease/ease.odin
index d5cb85dd8..0e6569bca 100644
--- a/core/math/ease/ease.odin
+++ b/core/math/ease/ease.odin
@@ -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.