Skip to content

Commit 96ba473

Browse files
committed
placement of const
1 parent 5eb6209 commit 96ba473

28 files changed

+77
-77
lines changed

include/boost/geometry/algorithms/assign.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ template <typename Geometry1, typename Geometry2>
216216
struct assign
217217
{
218218
static inline void
219-
apply(Geometry1& geometry1, const Geometry2& geometry2)
219+
apply(Geometry1& geometry1, Geometry2 const& geometry2)
220220
{
221221
concepts::check<Geometry1>();
222222
concepts::check<Geometry2 const>();

include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ struct buffered_piece_collection
698698
BOOST_GEOMETRY_ASSERT(pc.offsetted_count >= 0);
699699
}
700700

701-
inline void add_piece_point(piece& pc, const point_type& point, bool add_to_original)
701+
inline void add_piece_point(piece& pc, point_type const& point, bool add_to_original)
702702
{
703703
if (add_to_original && pc.type != strategy::buffer::buffered_concave)
704704
{

include/boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ inline void append_no_dups_or_spikes(Range& range, Point const& point,
100100
return;
101101
}
102102

103-
auto append = [](auto& r, const auto& p)
103+
auto append = [](auto& r, auto const& p)
104104
{
105105
using point_t = typename boost::range_value<Range>::type;
106106
point_t rp;

include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ inline void assign_parents(Geometry1 const& geometry1,
362362
}
363363
else if (info.parent.source_index >= 0)
364364
{
365-
const ring_info_type& parent = ring_map[info.parent];
365+
ring_info_type const& parent = ring_map[info.parent];
366366
bool const pos = math::larger(info.get_area(), 0);
367367
bool const parent_pos = math::larger(parent.area, 0);
368368

include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ struct cluster_colocator<Point, CoordinateType, geometry::cartesian_tag, false>
6262
{
6363
CoordinateType centroid_0 = 0;
6464
CoordinateType centroid_1 = 0;
65-
for (const auto& index : indices)
65+
for (auto const& index : indices)
6666
{
6767
centroid_0 += geometry::get<0>(turns[index].point);
6868
centroid_1 += geometry::get<1>(turns[index].point);
6969
}
7070
centroid_0 /= indices.size();
7171
centroid_1 /= indices.size();
72-
for (const auto& index : indices)
72+
for (auto const& index : indices)
7373
{
7474
geometry::set<0>(turns[index].point, centroid_0);
7575
geometry::set<1>(turns[index].point, centroid_1);

include/boost/geometry/algorithms/detail/overlay/discard_duplicate_turns.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ inline void discard_duplicate_start_turns(Turns& turns,
114114
{
115115
if (turn.method == method_start)
116116
{
117-
for (const auto& op : turn.operations)
117+
for (auto const& op : turn.operations)
118118
{
119119
start_turns_per_segment[adapt_id(op.seg_id)].push_back(index);
120120
}
@@ -130,7 +130,7 @@ inline void discard_duplicate_start_turns(Turns& turns,
130130
// Also avoid comparing "start" with itself.
131131
if (turn.method != method_crosses && turn.method != method_start)
132132
{
133-
for (const auto& op : turn.operations)
133+
for (auto const& op : turn.operations)
134134
{
135135
auto it = start_turns_per_segment.find(adapt_id(op.seg_id));
136136
if (it != start_turns_per_segment.end())

include/boost/geometry/algorithms/detail/overlay/get_distance_measure.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct get_distance_measure<CalculationType, spherical_tag>
7878
static result_type apply(SegmentPoint const& , SegmentPoint const& ,
7979
Point const& )
8080
{
81-
const result_type result;
81+
result_type const result;
8282
return result;
8383
}
8484
};
@@ -125,7 +125,7 @@ inline auto get_distance_measure(SegmentPoint const& p1, SegmentPoint const& p2,
125125
// Verify equality, without using a tolerance
126126
// (so don't use equals or equals_point_point)
127127
// because it is about very tiny differences.
128-
auto identical = [](const auto& point1, const auto& point2)
128+
auto identical = [](auto const& point1, auto const& point2)
129129
{
130130
return geometry::get<0>(point1) == geometry::get<0>(point2)
131131
&& geometry::get<1>(point1) == geometry::get<1>(point2);

include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ struct touch : public base_turn_handler
589589
// >----->P qj is LEFT of P1 and pi is LEFT of Q2
590590
// (the other way round is also possible)
591591

592-
auto has_distance = [&](const auto& r1, const auto& r2) -> bool
592+
auto has_distance = [&](auto const& r1, auto const& r2) -> bool
593593
{
594594
auto const d1 = get_distance_measure(r1.at(0), r1.at(1), r2.at(1), umbrella_strategy);
595595
auto const d2 = get_distance_measure(r2.at(1), r2.at(2), r1.at(0), umbrella_strategy);

include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ struct get_turn_info_linear_areal
696696
namespace ov = overlay;
697697
typedef ov::get_turn_info_for_endpoint<EnableFirst, EnableLast> get_info_e;
698698

699-
const std::size_t ip_count = inters.i_info().count;
699+
std::size_t const ip_count = inters.i_info().count;
700700
// no intersection points
701701
if (ip_count == 0)
702702
{

include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ inline void assign_cluster_ids(Turns& turns, Clusters const& clusters)
296296
}
297297
for (auto const& kv : clusters)
298298
{
299-
for (const auto& index : kv.second.turn_indices)
299+
for (auto const& index : kv.second.turn_indices)
300300
{
301301
turns[index].cluster_id = kv.first;
302302
}

0 commit comments

Comments
 (0)