Skip to content

Commit b872175

Browse files
authored
Merge pull request #35 from vedgy/static-gallop
Make TimSort::gallop* static
2 parents 3789245 + 5431f2f commit b872175

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

include/gfx/timsort.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ template <typename RandomAccessIterator, typename Compare> class TimSort {
264264
}
265265

266266
template <typename Iter>
267-
diff_t gallopLeft(ref_t key, Iter const base, diff_t const len, diff_t const hint, Compare compare) {
267+
static diff_t gallopLeft(ref_t key, Iter const base, diff_t const len,
268+
diff_t const hint, Compare compare) {
268269
GFX_TIMSORT_ASSERT(len > 0);
269270
GFX_TIMSORT_ASSERT(hint >= 0);
270271
GFX_TIMSORT_ASSERT(hint < len);
@@ -314,7 +315,8 @@ template <typename RandomAccessIterator, typename Compare> class TimSort {
314315
}
315316

316317
template <typename Iter>
317-
diff_t gallopRight(ref_t key, Iter const base, diff_t const len, diff_t const hint, Compare compare) {
318+
static diff_t gallopRight(ref_t key, Iter const base, diff_t const len,
319+
diff_t const hint, Compare compare) {
318320
GFX_TIMSORT_ASSERT(len > 0);
319321
GFX_TIMSORT_ASSERT(hint >= 0);
320322
GFX_TIMSORT_ASSERT(hint < len);

0 commit comments

Comments
 (0)