From 9e068c254b32767ea5b03af6b9955b34d0e4685d Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 7 Oct 2025 13:22:15 +0100 Subject: [PATCH] Fix typos --- core/slice/sort.odin | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/slice/sort.odin b/core/slice/sort.odin index 3d5bad34e..75c341d7c 100644 --- a/core/slice/sort.odin +++ b/core/slice/sort.odin @@ -348,11 +348,11 @@ sort_by_key :: proc(data: $T/[]$E, key: proc(E) -> $K) where ORD(K) { ctx := &Context{key} sort_by_generic_cmp(data, proc(lhs, rhs: rawptr, user_data: rawptr) -> Ordering { - x, y := (^E)(lhs)^, (^E)(rhs)^ + i, j := (^E)(lhs)^, (^E)(rhs)^ ctx := (^Context)(user_data) - a := k(i) - b := k(j) + a := ctx.key(i) + b := ctx.key(j) switch { case a < b: return .Less case a > b: return .Greater @@ -368,11 +368,11 @@ reverse_sort_by_key :: proc(data: $T/[]$E, key: proc(E) -> $K) where ORD(K) { ctx := &Context{key} sort_by_generic_cmp(data, proc(lhs, rhs: rawptr, user_data: rawptr) -> Ordering { - x, y := (^E)(lhs)^, (^E)(rhs)^ + i, j := (^E)(lhs)^, (^E)(rhs)^ ctx := (^Context)(user_data) - a := k(i) - b := k(j) + a := ctx.key(i) + b := ctx.key(j) switch { case a < b: return .Greater case a > b: return .Less