From 3f2a962ace2d0a58eed757bed5c5def4008c3c85 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Mon, 14 May 2018 19:17:00 -0500 Subject: [PATCH] East const -> west const. I regret nothing! --- include/boost/algorithm/find_backward.hpp | 8 ++++---- include/boost/algorithm/find_not.hpp | 4 ++-- test/find_backward_test.cpp | 16 ++++++++-------- test/find_not_test.cpp | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/boost/algorithm/find_backward.hpp b/include/boost/algorithm/find_backward.hpp index ffa7e03..66901a1 100644 --- a/include/boost/algorithm/find_backward.hpp +++ b/include/boost/algorithm/find_backward.hpp @@ -18,7 +18,7 @@ namespace boost { namespace algorithm { template BOOST_CXX14_CONSTEXPR -BidiIter find_backward(BidiIter first, BidiIter last, T const & x) +BidiIter find_backward(BidiIter first, BidiIter last, const T & x) { BidiIter it = last; while (it != first) { @@ -30,14 +30,14 @@ BidiIter find_backward(BidiIter first, BidiIter last, T const & x) template BOOST_CXX14_CONSTEXPR -typename boost::range_iterator::type find_backward(Range & range, T const & x) +typename boost::range_iterator::type find_backward(Range & range, const T & x) { return ::boost::algorithm::find_backward(boost::begin(range), boost::end(range), x); } template BOOST_CXX14_CONSTEXPR -BidiIter find_not_backward(BidiIter first, BidiIter last, T const & x) +BidiIter find_not_backward(BidiIter first, BidiIter last, const T & x) { BidiIter it = last; while (it != first) { @@ -49,7 +49,7 @@ BidiIter find_not_backward(BidiIter first, BidiIter last, T const & x) template BOOST_CXX14_CONSTEXPR -typename boost::range_iterator::type find_not_backward(Range & range, T const & x) +typename boost::range_iterator::type find_not_backward(Range & range, const T & x) { return ::boost::algorithm::find_not_backward(boost::begin(range), boost::end(range), x); } diff --git a/include/boost/algorithm/find_not.hpp b/include/boost/algorithm/find_not.hpp index 8934738..ef4df00 100644 --- a/include/boost/algorithm/find_not.hpp +++ b/include/boost/algorithm/find_not.hpp @@ -18,7 +18,7 @@ namespace boost { namespace algorithm { template BOOST_CXX14_CONSTEXPR -InputIter find_not(InputIter first, Sentinel last, T const & x) +InputIter find_not(InputIter first, Sentinel last, const T & x) { for (; first != last; ++first) { if (*first != x) @@ -29,7 +29,7 @@ InputIter find_not(InputIter first, Sentinel last, T const & x) template BOOST_CXX14_CONSTEXPR -typename boost::range_iterator::type find_not(Range & r, T const & x) +typename boost::range_iterator::type find_not(Range & r, const T & x) { return ::boost::algorithm::find_not(boost::begin(r), boost::end(r), x); } diff --git a/test/find_backward_test.cpp b/test/find_backward_test.cpp index 721c728..f78fadb 100644 --- a/test/find_backward_test.cpp +++ b/test/find_backward_test.cpp @@ -65,7 +65,7 @@ void test_find_backward() { { std::vector v1; - dist_t > const dist(v1); + const dist_t > dist(v1); for (int i = 5; i < 15; ++i) v1.push_back(i); @@ -89,7 +89,7 @@ void test_find_backward() // With bidirectional iterators. { std::list l1; - dist_t > const dist(l1); + const dist_t > dist(l1); for (int i = 5; i < 15; ++i) l1.push_back(i); @@ -154,7 +154,7 @@ void test_find_if_backward() { { std::vector v1; - dist_t > const dist(v1); + const dist_t > dist(v1); for (int i = 5; i < 15; ++i) v1.push_back(i); @@ -184,7 +184,7 @@ void test_find_if_backward() // With bidirectional iterators. { std::list l1; - dist_t > const dist(l1); + const dist_t > dist(l1); for (int i = 5; i < 15; ++i) l1.push_back(i); @@ -255,7 +255,7 @@ void test_find_if_not_backward() { { std::vector v1; - dist_t > const dist(v1); + const dist_t > dist(v1); for (int i = 5; i < 15; ++i) v1.push_back(i); @@ -289,7 +289,7 @@ void test_find_if_not_backward() // With bidirectional iterators. { std::list l1; - dist_t > const dist(l1); + const dist_t > dist(l1); for (int i = 5; i < 15; ++i) l1.push_back(i); @@ -352,7 +352,7 @@ void test_find_not_backward() { { std::vector v1; - dist_t > const dist(v1); + const dist_t > dist(v1); for (int i = 0; i < 5; ++i) v1.push_back(0); @@ -381,7 +381,7 @@ void test_find_not_backward() // With bidirectional iterators. { std::list l1; - dist_t > const dist(l1); + const dist_t > dist(l1); for (int i = 0; i < 5; ++i) l1.push_back(0); diff --git a/test/find_not_test.cpp b/test/find_not_test.cpp index 6b4c2f3..ef7529f 100644 --- a/test/find_not_test.cpp +++ b/test/find_not_test.cpp @@ -66,7 +66,7 @@ void test_sequence() { { std::vector v1; - dist_t > const dist(v1); + const dist_t > dist(v1); for (int i = 5; i < 15; ++i) v1.push_back(i); @@ -95,7 +95,7 @@ void test_sequence() // With bidirectional iterators. { std::list l1; - dist_t > const dist(l1); + const dist_t > dist(l1); for (int i = 5; i < 15; ++i) l1.push_back(i);