diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2022-06-07 13:23:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-07 13:23:01 +0100 |
| commit | bfcb527b42832868ce0edf9817b3a00a933dcde8 (patch) | |
| tree | ea256098d1759f34a4f1654897736c2b086f209f | |
| parent | fb49841b1d8e84cb721f5f73200d4c8158cbb4fa (diff) | |
| parent | a343fb171df0820e0607d864a1c099dab43a869a (diff) | |
Merge pull request #1831 from Despacito696969/master
Fixed `slice.is_sorted_cmp`
| -rw-r--r-- | core/slice/sort.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/slice/sort.odin b/core/slice/sort.odin index 8a2dec039..b6e455056 100644 --- a/core/slice/sort.odin +++ b/core/slice/sort.odin @@ -103,7 +103,7 @@ is_sorted_by :: proc(array: $T/[]$E, less: proc(i, j: E) -> bool) -> bool { is_sorted_by_cmp :: is_sorted_cmp is_sorted_cmp :: proc(array: $T/[]$E, cmp: proc(i, j: E) -> Ordering) -> bool { for i := len(array)-1; i > 0; i -= 1 { - if cmp(array[i], array[i-1]) == .Equal { + if cmp(array[i], array[i-1]) == .Less { return false } } |