diff --git a/include/boost/geometry/algorithms/assign.hpp b/include/boost/geometry/algorithms/assign.hpp index dabf1b4a5..5386ac649 100644 --- a/include/boost/geometry/algorithms/assign.hpp +++ b/include/boost/geometry/algorithms/assign.hpp @@ -216,7 +216,7 @@ template struct assign { static inline void - apply(Geometry1& geometry1, const Geometry2& geometry2) + apply(Geometry1& geometry1, Geometry2 const& geometry2) { concepts::check(); concepts::check(); diff --git a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp index 8aa949342..66943b303 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp @@ -698,7 +698,7 @@ struct buffered_piece_collection BOOST_GEOMETRY_ASSERT(pc.offsetted_count >= 0); } - inline void add_piece_point(piece& pc, const point_type& point, bool add_to_original) + inline void add_piece_point(piece& pc, point_type const& point, bool add_to_original) { if (add_to_original && pc.type != strategy::buffer::buffered_concave) { diff --git a/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp b/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp index 0af3c31c5..c52266c19 100644 --- a/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp @@ -100,7 +100,7 @@ inline void append_no_dups_or_spikes(Range& range, Point const& point, return; } - auto append = [](auto& r, const auto& p) + auto append = [](auto& r, auto const& p) { using point_t = typename boost::range_value::type; point_t rp; diff --git a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp index fb3ee1bef..578ba090c 100644 --- a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp @@ -362,7 +362,7 @@ inline void assign_parents(Geometry1 const& geometry1, } else if (info.parent.source_index >= 0) { - const ring_info_type& parent = ring_map[info.parent]; + ring_info_type const& parent = ring_map[info.parent]; bool const pos = math::larger(info.get_area(), 0); bool const parent_pos = math::larger(parent.area, 0); diff --git a/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp b/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp index 418b0bb87..6d04f0a09 100644 --- a/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp @@ -62,14 +62,14 @@ struct cluster_colocator { CoordinateType centroid_0 = 0; CoordinateType centroid_1 = 0; - for (const auto& index : indices) + for (auto const& index : indices) { centroid_0 += geometry::get<0>(turns[index].point); centroid_1 += geometry::get<1>(turns[index].point); } centroid_0 /= indices.size(); centroid_1 /= indices.size(); - for (const auto& index : indices) + for (auto const& index : indices) { geometry::set<0>(turns[index].point, centroid_0); geometry::set<1>(turns[index].point, centroid_1); diff --git a/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp index 258a815f0..ca537e081 100644 --- a/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp @@ -114,7 +114,7 @@ inline void discard_duplicate_start_turns(Turns& turns, { if (turn.method == method_start) { - for (const auto& op : turn.operations) + for (auto const& op : turn.operations) { start_turns_per_segment[adapt_id(op.seg_id)].push_back(index); } @@ -130,7 +130,7 @@ inline void discard_duplicate_start_turns(Turns& turns, // Also avoid comparing "start" with itself. if (turn.method != method_crosses && turn.method != method_start) { - for (const auto& op : turn.operations) + for (auto const& op : turn.operations) { auto it = start_turns_per_segment.find(adapt_id(op.seg_id)); if (it != start_turns_per_segment.end()) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp b/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp index d462bb524..81a9418a8 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp @@ -78,7 +78,7 @@ struct get_distance_measure static result_type apply(SegmentPoint const& , SegmentPoint const& , Point const& ) { - const result_type result; + result_type const result; return result; } }; @@ -125,7 +125,7 @@ inline auto get_distance_measure(SegmentPoint const& p1, SegmentPoint const& p2, // Verify equality, without using a tolerance // (so don't use equals or equals_point_point) // because it is about very tiny differences. - auto identical = [](const auto& point1, const auto& point2) + auto identical = [](auto const& point1, auto const& point2) { return geometry::get<0>(point1) == geometry::get<0>(point2) && geometry::get<1>(point1) == geometry::get<1>(point2); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index ee2b3f535..0fa6bdbd1 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -589,7 +589,7 @@ struct touch : public base_turn_handler // >----->P qj is LEFT of P1 and pi is LEFT of Q2 // (the other way round is also possible) - auto has_distance = [&](const auto& r1, const auto& r2) -> bool + auto has_distance = [&](auto const& r1, auto const& r2) -> bool { auto const d1 = get_distance_measure(r1.at(0), r1.at(1), r2.at(1), umbrella_strategy); auto const d2 = get_distance_measure(r2.at(1), r2.at(2), r1.at(0), umbrella_strategy); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp index 76d7faf6d..90e4d0d06 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp @@ -696,7 +696,7 @@ struct get_turn_info_linear_areal namespace ov = overlay; typedef ov::get_turn_info_for_endpoint get_info_e; - const std::size_t ip_count = inters.i_info().count; + std::size_t const ip_count = inters.i_info().count; // no intersection points if (ip_count == 0) { diff --git a/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp b/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp index aaabb4a4d..b41697477 100644 --- a/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp @@ -296,7 +296,7 @@ inline void assign_cluster_ids(Turns& turns, Clusters const& clusters) } for (auto const& kv : clusters) { - for (const auto& index : kv.second.turn_indices) + for (auto const& index : kv.second.turn_indices) { turns[index].cluster_id = kv.first; } diff --git a/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp index 435a80c27..3d7ea5eb3 100644 --- a/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp @@ -128,7 +128,7 @@ private : template static inline bool is_self_cluster(signed_size_type cluster_id, - const Turns& turns, Clusters const& clusters) + Turns const& turns, Clusters const& clusters) { auto cit = clusters.find(cluster_id); if (cit == clusters.end()) diff --git a/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp b/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp index d2c7dfacb..7e31a9fa9 100644 --- a/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp @@ -89,7 +89,7 @@ struct ranked_point struct less_by_turn_index { template - inline bool operator()(const T& first, const T& second) const + inline bool operator()(T const& first, T const& second) const { return first.turn_index == second.turn_index ? first.index < second.index @@ -101,7 +101,7 @@ struct less_by_turn_index struct less_by_index { template - inline bool operator()(const T& first, const T& second) const + inline bool operator()(T const& first, T const& second) const { // Length might be considered too // First order by from/to @@ -123,7 +123,7 @@ struct less_by_index struct less_false { template - inline bool operator()(const T&, const T& ) const + inline bool operator()(T const&, T const& ) const { return false; } @@ -132,14 +132,14 @@ struct less_false template struct less_by_side { - less_by_side(const PointOrigin& p1, const PointTurn& p2, SideStrategy const& strategy) + less_by_side(PointOrigin const& p1, PointTurn const& p2, SideStrategy const& strategy) : m_origin(p1) , m_turn_point(p2) , m_strategy(strategy) {} template - inline bool operator()(const T& first, const T& second) const + inline bool operator()(T const& first, T const& second) const { typedef typename SideStrategy::cs_tag cs_tag; @@ -418,7 +418,7 @@ public : for (std::size_t i = 0; i < m_ranked_points.size(); i++) { - const rp& ranked = m_ranked_points[i]; + rp const& ranked = m_ranked_points[i]; if (ranked.direction != dir_from) { continue; @@ -440,7 +440,7 @@ public : bool handled[2] = {false, false}; for (std::size_t i = 0; i < m_ranked_points.size(); i++) { - const rp& ranked = m_ranked_points[i]; + rp const& ranked = m_ranked_points[i]; if (ranked.direction != dir_from) { continue; diff --git a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp index 22ae1a2de..0baf475a0 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp @@ -505,7 +505,7 @@ public : } inline - bool select_operation(const turn_type& turn, + bool select_operation(turn_type const& turn, signed_size_type turn_index, signed_size_type start_turn_index, segment_identifier const& previous_seg_id, @@ -536,7 +536,7 @@ public : return result; } - inline int starting_operation_index(const turn_type& turn) const + inline int starting_operation_index(turn_type const& turn) const { for (int i = 0; i < 2; i++) { @@ -548,7 +548,7 @@ public : return -1; } - inline bool both_finished(const turn_type& turn) const + inline bool both_finished(turn_type const& turn) const { for (int i = 0; i < 2; i++) { diff --git a/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp b/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp index a91345e53..b2c21f051 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp @@ -149,8 +149,8 @@ struct traversal_ring_creator { // Check operation (TODO: this might be redundant or should be catched before) - const turn_type& current_turn = m_turns[turn_index]; - const turn_operation_type& op = current_turn.operations[op_index]; + turn_type const& current_turn = m_turns[turn_index]; + turn_operation_type const& op = current_turn.operations[op_index]; if (op.visited.finalized() || m_trav.is_visited(current_turn, op, turn_index, op_index)) { diff --git a/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp b/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp index cb1f0f40c..52232ae50 100644 --- a/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp +++ b/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp @@ -98,7 +98,7 @@ struct for_each_disjoint_geometry_if { BOOST_GEOMETRY_ASSERT(first != last); - const std::size_t count = boost::size(geometry); + std::size_t const count = boost::size(geometry); // O(I) // gather info about turns generated for contained geometries @@ -229,8 +229,8 @@ private: template class exit_watcher { - static const std::size_t op_id = OpId; - static const std::size_t other_op_id = (OpId + 1) % 2; + static std::size_t const op_id = OpId; + static std::size_t const other_op_id = (OpId + 1) % 2; typedef typename TurnInfo::point_type point_type; typedef detail::relate::point_info point_info; diff --git a/include/boost/geometry/arithmetic/infinite_line_functions.hpp b/include/boost/geometry/arithmetic/infinite_line_functions.hpp index 529e83716..16acb866c 100644 --- a/include/boost/geometry/arithmetic/infinite_line_functions.hpp +++ b/include/boost/geometry/arithmetic/infinite_line_functions.hpp @@ -97,7 +97,7 @@ side_value(model::infinite_line const& line, Point const& p) } template -inline bool is_degenerate(const model::infinite_line& line) +inline bool is_degenerate(model::infinite_line const& line) { static Type const zero = 0; return math::equals(line.a, zero) && math::equals(line.b, zero); diff --git a/include/boost/geometry/policies/robustness/segment_ratio.hpp b/include/boost/geometry/policies/robustness/segment_ratio.hpp index 9a3914a75..5a75fad01 100644 --- a/include/boost/geometry/policies/robustness/segment_ratio.hpp +++ b/include/boost/geometry/policies/robustness/segment_ratio.hpp @@ -153,7 +153,7 @@ public: , m_approximation(0) {} - inline segment_ratio(const Type& numerator, const Type& denominator) + inline segment_ratio(Type const& numerator, Type const& denominator) : m_numerator(numerator) , m_denominator(denominator) { @@ -207,7 +207,7 @@ public: inline Type const& numerator() const { return m_numerator; } inline Type const& denominator() const { return m_denominator; } - inline void assign(const Type& numerator, const Type& denominator) + inline void assign(Type const& numerator, Type const& denominator) { m_numerator = numerator; m_denominator = denominator; diff --git a/include/boost/geometry/util/math.hpp b/include/boost/geometry/util/math.hpp index c88572ed5..edd0f412c 100644 --- a/include/boost/geometry/util/math.hpp +++ b/include/boost/geometry/util/math.hpp @@ -450,7 +450,7 @@ struct define_half_pi template struct relaxed_epsilon { - static inline T apply(const T& factor) + static inline T apply(T const& factor) { return factor * std::numeric_limits::epsilon(); } diff --git a/test/algorithms/envelope_expand/test_envelope.hpp b/test/algorithms/envelope_expand/test_envelope.hpp index 0873d81ba..9ecd9eafb 100644 --- a/test/algorithms/envelope_expand/test_envelope.hpp +++ b/test/algorithms/envelope_expand/test_envelope.hpp @@ -42,8 +42,8 @@ struct check_result ctype >; - static void apply(Box const& b, const type& x1, const type& y1, const type& /*z1*/, - const type& x2, const type& y2, const type& /*z2*/) + static void apply(Box const& b, type const& x1, type const& y1, type const& /*z1*/, + type const& x2, type const& y2, type const& /*z2*/) { BOOST_CHECK_CLOSE((bg::get(b)), x1, 0.001); BOOST_CHECK_CLOSE((bg::get(b)), y1, 0.001); @@ -64,8 +64,8 @@ struct check_result ctype >; - static void apply(Box const& b, const type& x1, const type& y1, const type& z1, - const type& x2, const type& y2, const type& z2) + static void apply(Box const& b, type const& x1, type const& y1, type const& z1, + type const& x2, type const& y2, type const& z2) { BOOST_CHECK_CLOSE((bg::get(b)), x1, 0.001); BOOST_CHECK_CLOSE((bg::get(b)), y1, 0.001); @@ -80,9 +80,9 @@ struct check_result template void test_envelope(std::string const& wkt, - const T& x1, const T& x2, - const T& y1, const T& y2, - const T& z1 = 0, const T& z2 = 0) + T const& x1, T const& x2, + T const& y1, T const& y2, + T const& z1 = 0, T const& z2 = 0) { typedef bg::model::box::type > box_type; box_type b; diff --git a/test/algorithms/set_operations/difference/test_difference.hpp b/test/algorithms/set_operations/difference/test_difference.hpp index fb6dfe9a7..d9e13a210 100644 --- a/test/algorithms/set_operations/difference/test_difference.hpp +++ b/test/algorithms/set_operations/difference/test_difference.hpp @@ -159,7 +159,7 @@ void difference_output(std::string const& caseid, G1 const& g1, G2 const& g2, Ou template std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g2, - const count_set& expected_count, + count_set const& expected_count, int expected_rings_count, int expected_point_count, expectation_limits const& expected_area, difference_type dtype, @@ -305,7 +305,7 @@ std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g template std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g2, - const count_set& expected_count, int expected_point_count, + count_set const& expected_count, int expected_point_count, expectation_limits const& expected_area, difference_type dtype, ut_settings const& settings) @@ -323,15 +323,15 @@ static int counter = 0; template std::string test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count1, + count_set const& expected_count1, int expected_rings_count1, int expected_point_count1, expectation_limits const& expected_area1, - const count_set& expected_count2, + count_set const& expected_count2, int expected_rings_count2, int expected_point_count2, expectation_limits const& expected_area2, - const count_set& expected_count_s, + count_set const& expected_count_s, int expected_rings_count_s, int expected_point_count_s, expectation_limits const& expected_area_s, @@ -382,11 +382,11 @@ std::string test_one(std::string const& caseid, template std::string test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count1, + count_set const& expected_count1, int expected_rings_count1, int expected_point_count1, expectation_limits const& expected_area1, - const count_set& expected_count2, + count_set const& expected_count2, int expected_rings_count2, int expected_point_count2, expectation_limits const& expected_area2, @@ -407,13 +407,13 @@ std::string test_one(std::string const& caseid, template std::string test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count1, + count_set const& expected_count1, int expected_point_count1, expectation_limits const& expected_area1, - const count_set& expected_count2, + count_set const& expected_count2, int expected_point_count2, expectation_limits const& expected_area2, - const count_set& expected_count_s, + count_set const& expected_count_s, int expected_point_count_s, expectation_limits const& expected_area_s, ut_settings const& settings = ut_settings()) @@ -429,13 +429,13 @@ std::string test_one(std::string const& caseid, template std::string test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count1, + count_set const& expected_count1, int expected_point_count1, expectation_limits const& expected_area1, - const count_set& expected_count2, + count_set const& expected_count2, int expected_point_count2, expectation_limits const& expected_area2, - const count_set& expected_count_s, + count_set const& expected_count_s, ut_settings const& settings = ut_settings()) { return test_one(caseid, wkt1, wkt2, @@ -452,10 +452,10 @@ std::string test_one(std::string const& caseid, template std::string test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count1, + count_set const& expected_count1, int expected_point_count1, expectation_limits const& expected_area1, - const count_set& expected_count2, + count_set const& expected_count2, int expected_point_count2, expectation_limits const& expected_area2, ut_settings const& settings = ut_settings()) diff --git a/test/algorithms/set_operations/intersection/test_intersection.hpp b/test/algorithms/set_operations/intersection/test_intersection.hpp index 8c448a10c..1712670ac 100644 --- a/test/algorithms/set_operations/intersection/test_intersection.hpp +++ b/test/algorithms/set_operations/intersection/test_intersection.hpp @@ -67,7 +67,7 @@ template void check_result(IntersectionOutput const& intersection_output, std::string const& caseid, G1 const& g1, G2 const& g2, - const count_set& expected_count, const count_set& expected_hole_count, + count_set const& expected_count, count_set const& expected_hole_count, int expected_point_count, expectation_limits const& expected_length_or_area, ut_settings const& settings) { @@ -165,8 +165,8 @@ void check_result(IntersectionOutput const& intersection_output, template typename bg::default_area_result::type test_intersection(std::string const& caseid, G1 const& g1, G2 const& g2, - const count_set& expected_count = count_set(), - const count_set& expected_hole_count = count_set(), + count_set const& expected_count = count_set(), + count_set const& expected_hole_count = count_set(), int expected_point_count = 0, expectation_limits const& expected_length_or_area = 0, ut_settings const& settings = ut_settings()) { @@ -289,7 +289,7 @@ typename bg::default_area_result::type test_intersection(std::string const& template typename bg::default_area_result::type test_intersection(std::string const& caseid, G1 const& g1, G2 const& g2, - const count_set& expected_count = count_set(), int expected_point_count = 0, + count_set const& expected_count = count_set(), int expected_point_count = 0, expectation_limits const& expected_length_or_area = 0, ut_settings const& settings = ut_settings()) { @@ -303,8 +303,8 @@ typename bg::default_area_result::type test_intersection(std::string const& template typename bg::default_area_result::type test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count, - const count_set& expected_hole_count, + count_set const& expected_count, + count_set const& expected_hole_count, int expected_point_count, expectation_limits const& expected_length_or_area, ut_settings const& settings = ut_settings()) @@ -328,7 +328,7 @@ typename bg::default_area_result::type test_one(std::string const& caseid, template typename bg::default_area_result::type test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count, + count_set const& expected_count, int expected_point_count, expectation_limits const& expected_length_or_area, ut_settings const& settings = ut_settings()) @@ -342,7 +342,7 @@ typename bg::default_area_result::type test_one(std::string const& caseid, template void test_one_lp(std::string const& caseid, std::string const& wkt_areal, std::string const& wkt_linear, - const count_set& expected_count = count_set(), int expected_point_count = 0, + count_set const& expected_count = count_set(), int expected_point_count = 0, expectation_limits const& expected_length = 0, ut_settings const& settings = ut_settings()) { diff --git a/test/algorithms/set_operations/union/test_union.hpp b/test/algorithms/set_operations/union/test_union.hpp index 1946e3df7..eadf7841b 100644 --- a/test/algorithms/set_operations/union/test_union.hpp +++ b/test/algorithms/set_operations/union/test_union.hpp @@ -68,7 +68,7 @@ inline std::size_t num_points(Range const& rng, bool add_for_open = false) template void test_union(std::string const& caseid, G1 const& g1, G2 const& g2, - const count_set& expected_count, const count_set& expected_hole_count, + count_set const& expected_count, count_set const& expected_hole_count, int expected_point_count, expectation_limits const& expected_area, ut_settings const& settings) { @@ -240,7 +240,7 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2, template void test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2, - const count_set& expected_count, const count_set& expected_hole_count, + count_set const& expected_count, count_set const& expected_hole_count, int expected_point_count, expectation_limits const& expected_area, ut_settings const& settings = ut_settings()) { diff --git a/test/concepts/function_asserting_a_point.hpp b/test/concepts/function_asserting_a_point.hpp index 802d19852..3e67b89e0 100644 --- a/test/concepts/function_asserting_a_point.hpp +++ b/test/concepts/function_asserting_a_point.hpp @@ -18,7 +18,7 @@ namespace bg = boost::geometry; namespace test { template - void function_asserting_a_point(P& p1, const CP& p2) + void function_asserting_a_point(P& p1, CP const& p2) { BOOST_CONCEPT_ASSERT((bg::concepts::Point

)); BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint

)); diff --git a/test/concepts/function_requiring_a_point.hpp b/test/concepts/function_requiring_a_point.hpp index d8628e940..6af0991bb 100644 --- a/test/concepts/function_requiring_a_point.hpp +++ b/test/concepts/function_requiring_a_point.hpp @@ -17,7 +17,7 @@ namespace bg = boost::geometry; namespace test { template - inline void function_requiring_a_point(P& p1, const C& p2) + inline void function_requiring_a_point(P& p1, C const& p2) { BOOST_CONCEPT_ASSERT((bg::concepts::Point

)); BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint)); diff --git a/test/count_set.hpp b/test/count_set.hpp index 3ac900616..83e985a4b 100644 --- a/test/count_set.hpp +++ b/test/count_set.hpp @@ -49,7 +49,7 @@ struct count_set return m_values.count(value) > 0; } - friend std::ostream &operator<<(std::ostream &os, const count_set& s) + friend std::ostream &operator<<(std::ostream &os, count_set const& s) { os << "{"; for (std::size_t const& value : s.m_values) @@ -60,7 +60,7 @@ struct count_set return os; } - count_set operator+(const count_set& a) const + count_set operator+(count_set const& a) const { count_set result; result.m_values = combine(this->m_values, a.m_values); @@ -71,7 +71,7 @@ private : typedef std::set set_type; set_type m_values; - set_type combine(const set_type& a, const set_type& b) const + set_type combine(const set_type& a, set_type const& b) const { set_type result; if (a.size() == 1 && b.size() == 1) diff --git a/test/expectation_limits.hpp b/test/expectation_limits.hpp index ba7585803..bbb5c1462 100644 --- a/test/expectation_limits.hpp +++ b/test/expectation_limits.hpp @@ -42,7 +42,7 @@ struct expectation_limits bool has_two_limits() const { return m_lower_limit < m_upper_limit; } template - bool contains_logarithmic(const T& value, double tolerance) const + bool contains_logarithmic(T const& value, double tolerance) const { using std::abs; using std::log; @@ -50,7 +50,7 @@ struct expectation_limits } template - bool contains(const T& value, double percentage, bool logarithmic = false) const + bool contains(T const& value, double percentage, bool logarithmic = false) const { if (m_upper_limit < 1.0e-8) { @@ -80,7 +80,7 @@ struct expectation_limits : expectation_limits(this->m_lower_limit + a.m_lower_limit); } - friend std::ostream &operator<<(std::ostream &os, const expectation_limits& lim) + friend std::ostream &operator<<(std::ostream &os, expectation_limits const& lim) { if (lim.has_two_limits()) { diff --git a/test/geometries/custom_non_copiable/helper_functions.hpp b/test/geometries/custom_non_copiable/helper_functions.hpp index 489e5c45f..563baf2b5 100644 --- a/test/geometries/custom_non_copiable/helper_functions.hpp +++ b/test/geometries/custom_non_copiable/helper_functions.hpp @@ -17,7 +17,7 @@ #include template -void fill(Ring& ring, const std::vector::type>& v) +void fill(Ring& ring, std::vector::type> const& v) { ring.custom_clear(); for(auto const& p : v) diff --git a/test/test_common/test_point.hpp b/test/test_common/test_point.hpp index 3f888a2f5..42a0f11b4 100644 --- a/test/test_common/test_point.hpp +++ b/test/test_common/test_point.hpp @@ -74,7 +74,7 @@ template<> struct access return p.c1; } - static inline void set(test::test_point& p, const float& value) + static inline void set(test::test_point& p, float const& value) { p.c1 = value; } @@ -87,7 +87,7 @@ template<> struct access return p.c2; } - static inline void set(test::test_point& p, const float& value) + static inline void set(test::test_point& p, float const& value) { p.c2 = value; } @@ -100,7 +100,7 @@ template<> struct access return p.c3; } - static inline void set(test::test_point& p, const float& value) + static inline void set(test::test_point& p, float const& value) { p.c3 = value; }