Fix typos

This commit is contained in:
gingerBill
2025-10-07 13:22:15 +01:00
parent 85e37f2f7e
commit 9e068c254b
+6 -6
View File
@@ -348,11 +348,11 @@ sort_by_key :: proc(data: $T/[]$E, key: proc(E) -> $K) where ORD(K) {
ctx := &Context{key} ctx := &Context{key}
sort_by_generic_cmp(data, proc(lhs, rhs: rawptr, user_data: rawptr) -> Ordering { 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) ctx := (^Context)(user_data)
a := k(i) a := ctx.key(i)
b := k(j) b := ctx.key(j)
switch { switch {
case a < b: return .Less case a < b: return .Less
case a > b: return .Greater 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} ctx := &Context{key}
sort_by_generic_cmp(data, proc(lhs, rhs: rawptr, user_data: rawptr) -> Ordering { 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) ctx := (^Context)(user_data)
a := k(i) a := ctx.key(i)
b := k(j) b := ctx.key(j)
switch { switch {
case a < b: return .Greater case a < b: return .Greater
case a > b: return .Less case a > b: return .Less