mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-05-10 09:23:30 +00:00
remove warning
This commit is contained in:
parent
12e72dbf7e
commit
705773a03a
4 changed files with 78 additions and 78 deletions
|
@ -28,7 +28,7 @@ namespace sprout {
|
||||||
int found
|
int found
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return found < 0 || found == 2 && size1 < size2;
|
return found < 0 || (found == 2 && size1 < size2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Compare>
|
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Compare>
|
||||||
|
|
|
@ -131,7 +131,7 @@ namespace sprout {
|
||||||
: size == 1
|
: size == 1
|
||||||
? !comp(*first2, delim2) && !comp(delim2, *first2)
|
? !comp(*first2, delim2) && !comp(delim2, *first2)
|
||||||
? !comp(*first1, delim1) && !comp(delim1, *first1) ? 0 : 1
|
? !comp(*first1, delim1) && !comp(delim1, *first1) ? 0 : 1
|
||||||
: !comp(*first1, delim1) && !comp(delim1, *first1) || comp(*first1, *first2)
|
: (!comp(*first1, delim1) && !comp(delim1, *first1)) || comp(*first1, *first2)
|
||||||
? -1
|
? -1
|
||||||
: comp(*first2, *first1) ? 1 : 2
|
: comp(*first2, *first1) ? 1 : 2
|
||||||
: sprout::detail::tristate_lexicographical_compare_2_impl_ra(
|
: sprout::detail::tristate_lexicographical_compare_2_impl_ra(
|
||||||
|
@ -180,7 +180,7 @@ namespace sprout {
|
||||||
: n == 1
|
: n == 1
|
||||||
? !comp(*current.second, delim2) && !comp(delim2, *current.second)
|
? !comp(*current.second, delim2) && !comp(delim2, *current.second)
|
||||||
? type(!comp(*current.first, delim1) && !comp(delim1, *current.first) ? last1 : current.first, last2)
|
? type(!comp(*current.first, delim1) && !comp(delim1, *current.first) ? last1 : current.first, last2)
|
||||||
: !comp(*current.first, delim1) && !comp(delim1, *current.first) || comp(*current.first, *current.second)
|
: (!comp(*current.first, delim1) && !comp(delim1, *current.first)) || comp(*current.first, *current.second)
|
||||||
? type(last1, current.second)
|
? type(last1, current.second)
|
||||||
: comp(*current.second, *current.first) ? type(current.first, last2)
|
: comp(*current.second, *current.first) ? type(current.first, last2)
|
||||||
: type(sprout::next(current.first), sprout::next(current.second))
|
: type(sprout::next(current.first), sprout::next(current.second))
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
=============================================================================*/
|
=============================================================================*/
|
||||||
#ifndef SPROUT_BIT_ISOLS1B_HPP
|
#ifndef SPROUT_BIT_ISOLS1B_HPP
|
||||||
#define SPROUT_BIT_RSTLS1B_HPP
|
#define SPROUT_BIT_ISOLS1B_HPP
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <sprout/config.hpp>
|
#include <sprout/config.hpp>
|
||||||
|
@ -25,4 +25,4 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
||||||
#endif // #ifndef SPROUT_BIT_RSTLS1B_HPP
|
#endif // #ifndef SPROUT_BIT_ISOLS1B_HPP
|
||||||
|
|
|
@ -1,73 +1,73 @@
|
||||||
#ifndef SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP
|
#ifndef SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP
|
||||||
#define SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP
|
#define SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP
|
||||||
|
|
||||||
#include <sprout/config.hpp>
|
#include <sprout/config.hpp>
|
||||||
#include <sprout/utility/pair/pair.hpp>
|
#include <sprout/utility/pair/pair.hpp>
|
||||||
#include <sprout/iterator/next.hpp>
|
#include <sprout/iterator/next.hpp>
|
||||||
|
|
||||||
namespace sprout {
|
namespace sprout {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Compare>
|
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Compare>
|
||||||
inline SPROUT_CONSTEXPR int
|
inline SPROUT_CONSTEXPR int
|
||||||
lexicographical_compare_impl_ra(
|
lexicographical_compare_impl_ra(
|
||||||
RandomAccessIterator1 first1, RandomAccessIterator2 first2, Compare comp,
|
RandomAccessIterator1 first1, RandomAccessIterator2 first2, Compare comp,
|
||||||
typename std::iterator_traits<RandomAccessIterator1>::difference_type size,
|
typename std::iterator_traits<RandomAccessIterator1>::difference_type size,
|
||||||
int found
|
int found
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return found != 2 ? found
|
return found != 2 ? found
|
||||||
: size == 1 ? comp(*first1, *first2) ? -1 : comp(*first2, *first1) ? 1 : 2
|
: size == 1 ? comp(*first1, *first2) ? -1 : comp(*first2, *first1) ? 1 : 2
|
||||||
: sprout::detail::lexicographical_compare_impl_ra(
|
: sprout::detail::lexicographical_compare_impl_ra(
|
||||||
sprout::next(first1, size / 2), sprout::next(first2, size / 2), comp, size - size / 2,
|
sprout::next(first1, size / 2), sprout::next(first2, size / 2), comp, size - size / 2,
|
||||||
sprout::detail::lexicographical_compare_impl_ra(
|
sprout::detail::lexicographical_compare_impl_ra(
|
||||||
first1, first2, comp, size / 2,
|
first1, first2, comp, size / 2,
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
||||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||||
lexicographical_compare_impl_1(
|
lexicographical_compare_impl_1(
|
||||||
sprout::pair<InputIterator1, InputIterator2> const& current,
|
sprout::pair<InputIterator1, InputIterator2> const& current,
|
||||||
InputIterator1 last1, InputIterator2 last2, Compare comp,
|
InputIterator1 last1, InputIterator2 last2, Compare comp,
|
||||||
typename std::iterator_traits<InputIterator1>::difference_type n
|
typename std::iterator_traits<InputIterator1>::difference_type n
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typedef sprout::pair<InputIterator1, InputIterator2> type;
|
typedef sprout::pair<InputIterator1, InputIterator2> type;
|
||||||
return current.second == last2 || current.first == last1 ? current
|
return current.second == last2 || current.first == last1 ? current
|
||||||
: n == 1 ? comp(*current.first, *current.second) ? type(last1, current.second)
|
: n == 1 ? comp(*current.first, *current.second) ? type(last1, current.second)
|
||||||
: comp(*current.second, *current.first) ? type(current.first, last2)
|
: comp(*current.second, *current.first) ? type(current.first, last2)
|
||||||
: type(sprout::next(current.first), sprout::next(current.second))
|
: type(sprout::next(current.first), sprout::next(current.second))
|
||||||
: sprout::detail::lexicographical_compare_impl_1(
|
: sprout::detail::lexicographical_compare_impl_1(
|
||||||
sprout::detail::lexicographical_compare_impl_1(
|
sprout::detail::lexicographical_compare_impl_1(
|
||||||
current,
|
current,
|
||||||
last1, last2, comp, n / 2
|
last1, last2, comp, n / 2
|
||||||
),
|
),
|
||||||
last1, last2, comp, n - n / 2
|
last1, last2, comp, n - n / 2
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
template<typename InputIterator1, typename InputIterator2, typename Compare>
|
||||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||||
lexicographical_compare_impl(
|
lexicographical_compare_impl(
|
||||||
sprout::pair<InputIterator1, InputIterator2> const& current,
|
sprout::pair<InputIterator1, InputIterator2> const& current,
|
||||||
InputIterator1 last1, InputIterator2 last2, Compare comp,
|
InputIterator1 last1, InputIterator2 last2, Compare comp,
|
||||||
typename std::iterator_traits<InputIterator1>::difference_type n
|
typename std::iterator_traits<InputIterator1>::difference_type n
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return current.second == last2 || current.first == last1 ? current
|
return current.second == last2 || current.first == last1 ? current
|
||||||
: sprout::detail::lexicographical_compare_impl(
|
: sprout::detail::lexicographical_compare_impl(
|
||||||
sprout::detail::lexicographical_compare_impl_1(
|
sprout::detail::lexicographical_compare_impl_1(
|
||||||
current,
|
current,
|
||||||
last1, last2, comp, n
|
last1, last2, comp, n
|
||||||
),
|
),
|
||||||
last1, last2, comp, n * 2
|
last1, last2, comp, n * 2
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
||||||
#endif /* #ifndef SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP */
|
#endif /* #ifndef SPROUT_DETAIL_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP */
|
||||||
|
|
Loading…
Add table
Reference in a new issue