aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-05-06 11:32:35 +0100
committergingerBill <bill@gingerbill.org>2019-05-06 11:32:35 +0100
commitab0afa548b40ea3c0be6ebcbe1571cd6c3569021 (patch)
treec430175c4b571b2c61ce4677b6379c225445e792 /core
parentea1690b7a128e435b86e332d0742150cb9db02b0 (diff)
Fix ||= and &&=
Diffstat (limited to 'core')
-rw-r--r--core/sort/sort.odin8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/sort/sort.odin b/core/sort/sort.odin
index f511de226..4394cd259 100644
--- a/core/sort/sort.odin
+++ b/core/sort/sort.odin
@@ -189,6 +189,14 @@ merge_sort :: proc(array: $A/[]$T) {
}
+compare_bools :: proc(a, b: bool) -> int {
+ switch {
+ case !a && b: return -1;
+ case a && !b: return +1;
+ }
+ return 0;
+}
+
compare_ints :: proc(a, b: int) -> int {
switch delta := a - b; {