Skip to content

Commit fd6d0e7

Browse files
bangerthbarendgehrels
authored andcommitted
Avoid static variables and functions in header files.
1 parent 111f0df commit fd6d0e7

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ template
5050
typename RingCollection,
5151
typename Strategy
5252
>
53-
static inline bool within_selected_input(Item const& item2,
53+
inline bool within_selected_input(Item const& item2,
5454
InnerGeometry const& inner_geometry,
5555
ring_identifier const& outer_id,
5656
Geometry1 const& geometry1, Geometry2 const& geometry2,
@@ -86,7 +86,7 @@ template
8686
typename RingCollection,
8787
typename Strategy
8888
>
89-
static inline bool within_selected_input(Item const& item2,
89+
inline bool within_selected_input(Item const& item2,
9090
ring_identifier const& inner_id, ring_identifier const& outer_id,
9191
Geometry1 const& geometry1, Geometry2 const& geometry2,
9292
RingCollection const& collection,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace following { namespace linear
6060
// follower for linear/linear geometries set operations
6161

6262
template <typename Turn, typename Operation>
63-
static inline bool is_entering(Turn const& turn,
63+
inline bool is_entering(Turn const& turn,
6464
Operation const& operation)
6565
{
6666
if ( turn.method != method_touch && turn.method != method_touch_interior )
@@ -73,7 +73,7 @@ static inline bool is_entering(Turn const& turn,
7373

7474

7575
template <typename Turn, typename Operation>
76-
static inline bool is_staying_inside(Turn const& turn,
76+
inline bool is_staying_inside(Turn const& turn,
7777
Operation const& operation,
7878
bool entered)
7979
{
@@ -92,7 +92,7 @@ static inline bool is_staying_inside(Turn const& turn,
9292

9393

9494
template <typename Turn, typename Operation>
95-
static inline bool is_leaving(Turn const& turn,
95+
inline bool is_leaving(Turn const& turn,
9696
Operation const& operation,
9797
bool entered)
9898
{
@@ -125,7 +125,7 @@ static inline bool is_leaving(Turn const& turn,
125125

126126

127127
template <typename Turn, typename Operation>
128-
static inline bool is_isolated_point(Turn const& turn,
128+
inline bool is_isolated_point(Turn const& turn,
129129
Operation const& operation,
130130
bool entered)
131131
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct point_in_geometry_helper<Box, box_tag>
106106
// This function returns
107107
// when it finds a point of geometry1 inside or outside geometry2
108108
template <typename Geometry1, typename Geometry2, typename Strategy>
109-
static inline int range_in_geometry(Geometry1 const& geometry1,
109+
inline int range_in_geometry(Geometry1 const& geometry1,
110110
Geometry2 const& geometry2,
111111
Strategy const& strategy,
112112
bool skip_first = false)

include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ inline bool turn_on_the_same_ip(Turn const& prev_turn, Turn const& curr_turn,
358358
}
359359

360360
template <typename IntersectionPoint, typename OperationInfo, typename BoundaryChecker>
361-
static inline bool is_ip_on_boundary(IntersectionPoint const& ip,
361+
inline bool is_ip_on_boundary(IntersectionPoint const& ip,
362362
OperationInfo const& operation_info,
363363
BoundaryChecker const& boundary_checker)
364364
{

include/boost/geometry/core/access.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ namespace boost { namespace geometry
3333
{
3434

3535
/// Index of minimum corner of the box.
36-
int const min_corner = 0;
36+
BOOST_INLINE_CONSTEXPR int min_corner = 0;
3737

3838
/// Index of maximum corner of the box.
39-
int const max_corner = 1;
39+
BOOST_INLINE_CONSTEXPR int max_corner = 1;
4040

4141
namespace traits
4242
{

include/boost/geometry/formulas/spherical.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct result_spherical
4545
};
4646

4747
template <typename T>
48-
static inline void sph_to_cart3d(T const& lon, T const& lat, T & x, T & y, T & z)
48+
inline void sph_to_cart3d(T const& lon, T const& lat, T & x, T & y, T & z)
4949
{
5050
T const cos_lat = cos(lat);
5151
x = cos_lat * cos(lon);
@@ -54,7 +54,7 @@ static inline void sph_to_cart3d(T const& lon, T const& lat, T & x, T & y, T & z
5454
}
5555

5656
template <typename Point3d, typename PointSph>
57-
static inline Point3d sph_to_cart3d(PointSph const& point_sph)
57+
inline Point3d sph_to_cart3d(PointSph const& point_sph)
5858
{
5959
using calc_t = coordinate_type_t<Point3d>;
6060

@@ -72,14 +72,14 @@ static inline Point3d sph_to_cart3d(PointSph const& point_sph)
7272
}
7373

7474
template <typename T>
75-
static inline void cart3d_to_sph(T const& x, T const& y, T const& z, T & lon, T & lat)
75+
inline void cart3d_to_sph(T const& x, T const& y, T const& z, T & lon, T & lat)
7676
{
7777
lon = atan2(y, x);
7878
lat = asin(z);
7979
}
8080

8181
template <typename PointSph, typename Point3d>
82-
static inline PointSph cart3d_to_sph(Point3d const& point_3d)
82+
inline PointSph cart3d_to_sph(Point3d const& point_3d)
8383
{
8484
using coord_t = coordinate_type_t<PointSph>;
8585
using calc_t = coordinate_type_t<Point3d>;
@@ -113,7 +113,7 @@ static inline PointSph cart3d_to_sph(Point3d const& point_3d)
113113
// 1 left
114114
// 0 on
115115
template <typename Point3d1, typename Point3d2>
116-
static inline int sph_side_value(Point3d1 const& norm, Point3d2 const& pt)
116+
inline int sph_side_value(Point3d1 const& norm, Point3d2 const& pt)
117117
{
118118
typedef typename select_coordinate_type<Point3d1, Point3d2>::type calc_t;
119119
calc_t c0 = 0;
@@ -124,7 +124,7 @@ static inline int sph_side_value(Point3d1 const& norm, Point3d2 const& pt)
124124
}
125125

126126
template <typename CT, bool ReverseAzimuth, typename T1, typename T2>
127-
static inline result_spherical<CT> spherical_azimuth(T1 const& lon1,
127+
inline result_spherical<CT> spherical_azimuth(T1 const& lon1,
128128
T1 const& lat1,
129129
T2 const& lon2,
130130
T2 const& lat2)

include/boost/geometry/index/detail/utilities.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
namespace boost { namespace geometry { namespace index { namespace detail {
2121

2222
template<class T>
23-
static inline void assign_cond(T & l, T const& r, std::true_type)
23+
inline void assign_cond(T & l, T const& r, std::true_type)
2424
{
2525
l = r;
2626
}
2727

2828
template<class T>
29-
static inline void assign_cond(T &, T const&, std::false_type) {}
29+
inline void assign_cond(T &, T const&, std::false_type) {}
3030

3131
template<class T>
32-
static inline void move_cond(T & l, T & r, std::true_type)
32+
inline void move_cond(T & l, T & r, std::true_type)
3333
{
3434
l = std::move(r);
3535
}
3636

3737
template<class T>
38-
static inline void move_cond(T &, T &, std::false_type) {}
38+
inline void move_cond(T &, T &, std::false_type) {}
3939

4040
template <typename T> inline
4141
void swap_cond(T & l, T & r, std::true_type)

0 commit comments

Comments
 (0)