diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-03 15:06:40 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-03 15:06:40 +0100 |
| commit | d556fa2cd8570363a66a7d8a2a5abf5ba306e954 (patch) | |
| tree | e7ceed61e3bdfba8515f5c4048066b5567b71a7a /core/sort | |
| parent | 9bd7f023b204974264fc99ee268fd9e8a5df9570 (diff) | |
Remove special shared scope for runtime stuff
Diffstat (limited to 'core/sort')
| -rw-r--r-- | core/sort/sort.odin | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/sort/sort.odin b/core/sort/sort.odin index f2e349b61..b69102b8e 100644 --- a/core/sort/sort.odin +++ b/core/sort/sort.odin @@ -1,5 +1,7 @@ package sort +import "core:mem" + bubble_sort_proc :: proc(array: $A/[]$T, f: proc(T, T) -> int) { assert(f != nil); count := len(array); @@ -211,5 +213,5 @@ compare_f64s :: proc(a, b: f64) -> int { return 0; } compare_strings :: proc(a, b: string) -> int { - return __string_cmp(a, b); + return mem.compare_byte_ptrs(&a[0], &b[0], min(len(a), len(b))); } |