diff options
| author | gingerBill <bill@gingerbill.org> | 2019-05-06 11:32:35 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-05-06 11:32:35 +0100 |
| commit | ab0afa548b40ea3c0be6ebcbe1571cd6c3569021 (patch) | |
| tree | c430175c4b571b2c61ce4677b6379c225445e792 /core | |
| parent | ea1690b7a128e435b86e332d0742150cb9db02b0 (diff) | |
Fix ||= and &&=
Diffstat (limited to 'core')
| -rw-r--r-- | core/sort/sort.odin | 8 |
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; { |