From be0af6bd0b6eb044d1acc4f754b229972d99903a Mon Sep 17 00:00:00 2001 From: Danila Kutenin Date: Mon, 9 Nov 2020 19:48:43 +0300 Subject: [PATCH] Fix several warnings and for now give up a bit on non copyable comparator --- .travis.yml | 2 +- include/miniselect/pdqselect.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca4c4b0..a5036ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,7 +126,7 @@ before_install: - git clone https://github.com/google/googletest.git benchmark/googletest install: - - export CMAKE_FLAGS="-DMINISELECT_TESTING=on"; + - export CMAKE_FLAGS="-DMINISELECT_TESTING=on -DCMAKE_BUILD_TYPE=RelWithDebInfo"; - if [[ "${SANITIZE}" == "on" ]]; then export CMAKE_FLAGS="${CMAKE_FLAGS} -DMINISELECT_SANITIZE=on"; fi diff --git a/include/miniselect/pdqselect.h b/include/miniselect/pdqselect.h index 42c7726..0a22d05 100644 --- a/include/miniselect/pdqselect.h +++ b/include/miniselect/pdqselect.h @@ -501,7 +501,6 @@ template inline void pdqsort_loop(Iter begin, Iter end, Compare& comp, int bad_allowed, bool leftmost = true) { typedef typename std::iterator_traits::difference_type diff_t; - using CompType = typename median_common_detail::CompareRefType::type; // Use a while loop for tail recursion elimination. while (true) { @@ -606,7 +605,7 @@ template inline void pdqpartial_sort_loop(Iter begin, Iter mid, Iter end, Compare& comp, int bad_allowed, bool leftmost = true) { typedef typename std::iterator_traits::difference_type diff_t; - using CompType = typename median_common_detail::CompareRefType::type; + // Use a while loop for tail recursion elimination. while (true) { diff_t size = end - begin; @@ -714,7 +713,6 @@ template inline void pdqselect_loop(Iter begin, Iter mid, Iter end, Compare& comp, int bad_allowed, bool leftmost = true) { typedef typename std::iterator_traits::difference_type diff_t; - using CompType = typename median_common_detail::CompareRefType::type; // Use a while loop for tail recursion elimination. while (true) {