diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-08 12:35:14 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-08 12:35:14 +0100 |
| commit | 10259ee665db0d6c2fe335c304e1a4d1b4188e06 (patch) | |
| tree | 49c8869806ad3569e5d7c4313207d246f8f5ad72 /core/slice | |
| parent | 7815d78f8838d65603bfc8ed2b165ad7650287d3 (diff) | |
Minor rename of a procedure
Diffstat (limited to 'core/slice')
| -rw-r--r-- | core/slice/sort.odin | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/slice/sort.odin b/core/slice/sort.odin index dde5592e8..42112c613 100644 --- a/core/slice/sort.odin +++ b/core/slice/sort.odin @@ -81,14 +81,12 @@ sort_by_indices_overwrite :: proc(data: $T/[]$E, indices: []int) { swap_with_slice(data, temp) } -@(private) -_internal_sort_from_indices_permuation :: proc(data: $T/[]$E, indices: []int) { +sort_from_permutation_indices :: proc(data: $T/[]$E, indices: []int) { assert(len(data) == len(indices)) if len(indices) <= 1 { return } - // TODO(bill): This is not O(N) for i in 0..<len(indices) { index_to_swap := indices[i] @@ -124,7 +122,7 @@ sort_with_indices :: proc(data: $T/[]$E, allocator := context.allocator) -> (ind return .Equal }, raw_data(data)) - _internal_sort_from_indices_permuation(data, indices) + sort_from_permutation_indices(data, indices) } return indices } @@ -201,7 +199,7 @@ sort_by_with_indices :: proc(data: $T/[]$E, less: proc(i, j: E) -> bool, allocat return .Equal }, ctx) - _internal_sort_from_indices_permuation(data, indices) + sort_from_permutation_indices(data, indices) } } return indices @@ -234,7 +232,7 @@ sort_by_with_indices_with_data :: proc(data: $T/[]$E, less: proc(i, j: E, user_d return .Equal }, ctx) - _internal_sort_from_indices_permuation(data, indices) + sort_from_permutation_indices(data, indices) } } return indices |