Skip to content

Commit 19f22c2

Browse files
committed
chore: change point_type to point_type_t and use 'using' at those places
1 parent 8d2d399 commit 19f22c2

File tree

85 files changed

+285
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+285
-343
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ inline void simplify_input(RangeIn const& range,
8686
template <typename RingOutput>
8787
struct buffer_range
8888
{
89-
typedef typename point_type<RingOutput>::type output_point_type;
90-
typedef typename coordinate_type<RingOutput>::type coordinate_type;
89+
using output_point_type = point_type_t<RingOutput>;
90+
using coordinate_type = coordinate_type_t<RingOutput>;
9191

9292
template
9393
<
@@ -432,7 +432,7 @@ struct buffer_inserter<point_tag, Point, RingOutput>
432432
{
433433
detail::buffer::buffer_point
434434
<
435-
typename point_type<RingOutput>::type
435+
point_type_t<RingOutput>
436436
>(point, collection, distance_strategy, point_strategy);
437437
}
438438
};
@@ -446,7 +446,7 @@ template
446446
>
447447
struct buffer_inserter_ring
448448
{
449-
using output_point_type = typename point_type<RingOutput>::type;
449+
using output_point_type = point_type_t<RingOutput>;
450450

451451
template
452452
<
@@ -609,8 +609,8 @@ template
609609
>
610610
struct buffer_inserter<linestring_tag, Linestring, Polygon>
611611
{
612-
using output_ring_type = typename ring_type<Polygon>::type;
613-
using output_point_type = typename point_type<output_ring_type>::type;
612+
using output_ring_type = ring_type_t<Polygon>;
613+
using output_point_type = point_type_t<output_ring_type>;
614614

615615
template
616616
<

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,13 @@ struct buffer_all<Input, Output, TagIn, multi_polygon_tag>
7878
{
7979
typedef typename boost::range_value<Output>::type polygon_type;
8080

81-
typedef typename point_type<Input>::type point_type;
82-
8381
if (geometry::is_empty(geometry_in))
8482
{
8583
// Then output geometry is kept empty as well
8684
return;
8785
}
8886

89-
model::box<point_type> box;
87+
model::box<point_type_t<Input>> box;
9088
geometry::envelope(geometry_in, box);
9189
geometry::buffer(box, box, distance_strategy.max_distance(join_strategy, end_strategy));
9290

include/boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,8 @@ class geometry_to_range
120120
typename strategy::distance::services::return_type
121121
<
122122
Strategy,
123-
typename point_type<Geometry>::type,
124-
typename point_type
125-
<
126-
typename std::iterator_traits
127-
<
128-
RangeIterator
129-
>::value_type
130-
>::type
123+
point_type_t<Geometry>,
124+
point_type_t<typename std::iterator_traits<RangeIterator>::value_type>
131125
>::type dist_min;
132126

133127
return apply(geometry, first, last, strategy, dist_min);

include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ class range_to_range_rtree
177177
typename strategy::distance::services::return_type
178178
<
179179
Strategy,
180-
typename point_type<rtree_value_type>::type,
181-
typename point_type
180+
point_type_t<rtree_value_type>,
181+
point_type_t
182182
<
183183
typename std::iterator_traits
184184
<
185185
QueryRangeIterator
186186
>::value_type
187-
>::type
187+
>
188188
>::type dist_min;
189189

190190
return apply(rtree_first, rtree_last, queries_first, queries_last,

include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct linear_to_areal
3939
using point_type = typename std::conditional
4040
<
4141
std::is_same<typename coordinate_type<Linear>::type, most_precise_type>::value,
42-
typename point_type<Linear>::type,
43-
typename point_type<Areal>::type
42+
point_type_t<Linear>,
43+
point_type_t<Areal>
4444
>::type;
4545

4646
using linestring_type = geometry::model::linestring<point_type>;
@@ -108,7 +108,7 @@ struct segment_to_areal
108108
Strategies const& strategies,
109109
bool = false)
110110
{
111-
using linestring_type = geometry::model::linestring<typename point_type<Segment>::type>;
111+
using linestring_type = geometry::model::linestring<point_type_t<Segment>>;
112112
linestring_type linestring;
113113
convert(segment, linestring);
114114
linear_to_areal::apply(linestring, areal, shortest_seg, strategies);
@@ -142,8 +142,8 @@ struct areal_to_areal
142142
using point_type = typename std::conditional
143143
<
144144
std::is_same<typename coordinate_type<Areal1>::type, most_precise_type>::value,
145-
typename point_type<Areal1>::type,
146-
typename point_type<Areal2>::type
145+
point_type_t<Areal1>,
146+
point_type_t<Areal2>
147147
>::type;
148148

149149
using linestring_type = geometry::model::linestring<point_type>;

include/boost/geometry/algorithms/detail/closest_points/linear_to_linear.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct linear_to_linear
4343
{
4444
dispatch::closest_points
4545
<
46-
typename point_type<Linear1>::type,
46+
point_type_t<Linear1>,
4747
Linear2
4848
>::apply(*points_begin(linear1), linear2, shortest_seg, strategies);
4949
return;
@@ -53,7 +53,7 @@ struct linear_to_linear
5353
{
5454
dispatch::closest_points
5555
<
56-
typename point_type<Linear2>::type,
56+
point_type_t<Linear2>,
5757
Linear1
5858
>::apply(*points_begin(linear2), linear1, shortest_seg, strategies);
5959
detail::closest_points::swap_segment_points::apply(shortest_seg);
@@ -91,7 +91,7 @@ struct segment_to_linear
9191
bool = false)
9292
{
9393
using linestring_type = geometry::model::linestring
94-
<typename point_type<Segment>::type>;
94+
<point_type_t<Segment>>;
9595
linestring_type linestring;
9696
convert(segment, linestring);
9797
linear_to_linear::apply(linestring, linear, shortest_seg, strategies);

include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct segment_to_multipoint
125125
{
126126
using linestring_type = geometry::model::linestring
127127
<
128-
typename point_type<Segment>::type
128+
point_type_t<Segment>
129129
>;
130130
linestring_type linestring;
131131
convert(segment, linestring);
@@ -150,7 +150,7 @@ struct multipoint_to_segment
150150
{
151151
using linestring_type = geometry::model::linestring
152152
<
153-
typename point_type<Segment>::type
153+
point_type_t<Segment>
154154
>;
155155
linestring_type linestring;
156156
convert(segment, linestring);

include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct point_to_segment
6868
static inline void apply(Point const& point, Segment const& segment,
6969
OutputSegment& shortest_seg, Strategies const& strategies)
7070
{
71-
typename point_type<Segment>::type p[2];
71+
point_type_t<Segment> p[2];
7272
geometry::detail::assign_point_from_index<0>(segment, p[0]);
7373
geometry::detail::assign_point_from_index<1>(segment, p[1]);
7474

include/boost/geometry/algorithms/detail/closest_points/segment_to_segment.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class segment_to_segment
5454
{
5555
using intersection_return_type = segment_intersection_points
5656
<
57-
typename point_type<Segment1>::type
57+
point_type_t<Segment1>
5858
>;
5959

6060
using intersection_policy = policies::relate::segments_intersection_points
@@ -74,11 +74,11 @@ class segment_to_segment
7474
return;
7575
}
7676

77-
typename point_type<Segment1>::type p[2];
77+
point_type_t<Segment1> p[2];
7878
detail::assign_point_from_index<0>(segment1, p[0]);
7979
detail::assign_point_from_index<1>(segment1, p[1]);
8080

81-
typename point_type<Segment2>::type q[2];
81+
point_type_t<Segment2> q[2];
8282
detail::assign_point_from_index<0>(segment2, q[0]);
8383
detail::assign_point_from_index<1>(segment2, q[1]);
8484

include/boost/geometry/algorithms/detail/closest_points/utilities.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ using creturn_t = typename strategy::distance::services::return_type
5757
<
5858
distance_strategy_t<Geometry1, Geometry2, Strategies>
5959
>::type,
60-
typename point_type<Geometry1>::type,
61-
typename point_type<Geometry2>::type
60+
point_type_t<Geometry1>,
61+
point_type_t<Geometry2>
6262
>::type;
6363

6464

include/boost/geometry/algorithms/detail/convex_hull/interface.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ struct convex_hull
213213
detail::convex_hull::input_geometry_proxy<Geometry> in_proxy(geometry);
214214
detail::convex_hull::graham_andrew
215215
<
216-
typename point_type<Geometry>::type
216+
point_type_t<Geometry>
217217
>::apply(in_proxy, out, strategy);
218218
}
219219
};
@@ -234,7 +234,7 @@ struct convex_hull<Box, box_tag>
234234
static bool const Reverse
235235
= geometry::point_order<OutputGeometry>::value == counterclockwise;
236236

237-
std::array<typename point_type<OutputGeometry>::type, 4> arr;
237+
std::array<point_type_t<OutputGeometry>, 4> arr;
238238
// TODO: This assigns only 2d cooridnates!
239239
// And it is also used in box_view<>!
240240
geometry::detail::assign_box_corners_oriented<Reverse>(box, arr);

include/boost/geometry/algorithms/detail/covered_by/implementation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct geometry_covered_by_box
6565
template <typename Geometry, typename Box, typename Strategy>
6666
static inline bool apply(Geometry const& geometry, Box const& box, Strategy const& strategy)
6767
{
68-
using point_type = typename point_type<Geometry>::type;
68+
using point_type = point_type_t<Geometry>;
6969
using mutable_point_type = typename helper_geometry<point_type>::type;
7070
using box_type = model::box<mutable_point_type>;
7171

include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ struct disjoint_no_intersections_policy
7171
template <typename Strategy>
7272
static inline bool apply(Geometry1 const& g1, Geometry2 const& g2, Strategy const& strategy)
7373
{
74-
using point_type = typename point_type<Geometry1>::type;
75-
typename helper_geometry<point_type>::type p;
74+
typename helper_geometry<point_type_t<Geometry1>>::type p;
7675
geometry::point_on_border(p, g1);
7776

7877
return ! geometry::covered_by(p, g2, strategy);
@@ -183,7 +182,7 @@ class disjoint_segment_areal<Segment, Polygon, polygon_tag>
183182
return false;
184183
}
185184

186-
typename point_type<Segment>::type p;
185+
point_type_t<Segment> p;
187186
detail::assign_point_from_index<0>(segment, p);
188187

189188
return ! geometry::covered_by(p, polygon, strategy);
@@ -219,7 +218,7 @@ struct disjoint_segment_areal<Segment, Ring, ring_tag>
219218
return false;
220219
}
221220

222-
typename point_type<Segment>::type p;
221+
point_type_t<Segment> p;
223222
detail::assign_point_from_index<0>(segment, p);
224223

225224
return ! geometry::covered_by(p, ring, strategy);

include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ struct disjoint_segment
5555
static inline bool apply(Segment1 const& segment1, Segment2 const& segment2,
5656
Strategy const& strategy)
5757
{
58-
typedef typename point_type<Segment1>::type point_type;
59-
60-
typedef segment_intersection_points<point_type> intersection_return_type;
61-
62-
typedef policies::relate::segments_intersection_points
58+
using point_type = point_type_t<Segment1>;
59+
using intersection_return_type = segment_intersection_points<point_type>;
60+
using intersection_policy = policies::relate::segments_intersection_points
6361
<
6462
intersection_return_type
65-
> intersection_policy;
63+
>;
6664

6765
detail::segment_as_subrange<Segment1> sub_range1(segment1);
6866
detail::segment_as_subrange<Segment2> sub_range2(segment2);

include/boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct disjoint_range_segment_or_box
8686
SegmentOrBox const& segment_or_box,
8787
Strategy const& strategy)
8888
{
89-
using point_type = typename point_type<Range>::type;
89+
using point_type = point_type_t<Range>;
9090
using range_segment = typename geometry::model::referring_segment<point_type const>;
9191

9292
detail::closed_view<Range const> const view(range);

include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class multipoint_linear
254254
// should be passed, where envelope would be lazily calculated when needed the first time
255255
geometry::partition
256256
<
257-
geometry::model::box<typename point_type<MultiPoint>::type>
257+
geometry::model::box<point_type_t<MultiPoint>>
258258
>::apply(multipoint, segment_range(linear), visitor,
259259
expand_box_point<Strategy>(strategy),
260260
overlaps_box_point<Strategy>(strategy),
@@ -282,9 +282,9 @@ class multi_point_single_geometry
282282
SingleGeometry const& single_geometry,
283283
Strategy const& strategy)
284284
{
285-
typedef typename point_type<MultiPoint>::type point1_type;
286-
typedef typename point_type<SingleGeometry>::type point2_type;
287-
typedef model::box<point2_type> box2_type;
285+
using point1_type = point_type_t<MultiPoint>;
286+
using point2_type = point_type_t<SingleGeometry>;
287+
using box2_type = model::box<point2_type>;
288288

289289
box2_type box2;
290290
geometry::envelope(single_geometry, box2, strategy);
@@ -424,11 +424,11 @@ class multi_point_multi_geometry
424424
template <typename Strategy>
425425
static inline bool apply(MultiPoint const& multi_point, MultiGeometry const& multi_geometry, Strategy const& strategy)
426426
{
427-
typedef typename point_type<MultiPoint>::type point1_type;
428-
typedef typename point_type<MultiGeometry>::type point2_type;
429-
typedef model::box<point1_type> box1_type;
430-
typedef model::box<point2_type> box2_type;
431-
typedef std::pair<box2_type, std::size_t> box_pair_type;
427+
using point1_type = point_type_t<MultiPoint>;
428+
using point2_type = point_type_t<MultiGeometry>;
429+
using box1_type = model::box<point1_type>;
430+
using box2_type = model::box<point2_type>;
431+
using box_pair_type = std::pair<box2_type, std::size_t>;
432432

433433
std::size_t count2 = boost::size(multi_geometry);
434434
std::vector<box_pair_type> boxes(count2);

include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ struct disjoint_segment_box_sphere_or_spheroid
8484
DisjointPointBoxStrategy const& disjoint_point_box_strategy,
8585
DisjointBoxBoxStrategy const& disjoint_box_box_strategy)
8686
{
87-
typedef typename point_type<Segment>::type segment_point;
88-
segment_point vertex;
87+
point_type_t<Segment> vertex;
8988
return apply(segment, box, vertex,
9089
azimuth_strategy,
9190
normalize_strategy,
@@ -112,13 +111,13 @@ struct disjoint_segment_box_sphere_or_spheroid
112111
{
113112
assert_dimension_equal<Segment, Box>();
114113

115-
typedef typename point_type<Segment>::type segment_point_type;
114+
using segment_point_type = point_type_t<Segment>;
116115

117116
segment_point_type p0, p1;
118117
geometry::detail::assign_point_from_index<0>(segment, p0);
119118
geometry::detail::assign_point_from_index<1>(segment, p1);
120119

121-
//vertex not computed here
120+
// Vertex is not computed here
122121
disjoint_info disjoint_return_value = disjoint_info::disjoint_no_vertex;
123122

124123
// Simplest cases first

include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,16 @@ template
8181
class geometry_to_segment_or_box
8282
{
8383
private:
84-
typedef typename point_type<SegmentOrBox>::type segment_or_box_point;
85-
86-
typedef distance::strategy_t<Geometry, SegmentOrBox, Strategies> strategy_type;
87-
88-
typedef detail::closest_feature::point_to_point_range
84+
using segment_or_box_point = point_type_t<SegmentOrBox>;
85+
using strategy_type = distance::strategy_t<Geometry, SegmentOrBox, Strategies>;
86+
using point_to_point_range = detail::closest_feature::point_to_point_range
8987
<
90-
typename point_type<Geometry>::type,
88+
point_type_t<Geometry>,
9189
std::vector<segment_or_box_point>,
9290
segment_or_box_point_range_closure<SegmentOrBox>::value
93-
> point_to_point_range;
94-
95-
typedef detail::closest_feature::geometry_to_range geometry_to_range;
96-
97-
typedef distance::creturn_t<Geometry, SegmentOrBox, Strategies> comparable_return_type;
91+
>;
92+
using geometry_to_range = detail::closest_feature::geometry_to_range;
93+
using comparable_return_type = distance::creturn_t<Geometry, SegmentOrBox, Strategies>;
9894

9995
// assign the new minimum value for an iterator of the point range
10096
// of a segment or a box
@@ -320,7 +316,7 @@ class geometry_to_segment_or_box
320316
:
321317
dispatch::distance
322318
<
323-
typename point_type<MultiPoint>::type,
319+
point_type_t<MultiPoint>,
324320
SegmentOrBox,
325321
Strategies
326322
>::apply(*it_min, segment_or_box, strategies);

0 commit comments

Comments
 (0)