diff --git a/include/boost/geometry/algorithms/detail/is_valid/box.hpp b/include/boost/geometry/algorithms/detail/is_valid/box.hpp index 139502af7..e7a67252b 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/box.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/box.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -12,6 +13,8 @@ #include +#include + #include #include #include @@ -57,6 +60,8 @@ struct has_valid_corners template static inline bool apply(Box const&, VisitPolicy& visitor) { + boost::ignore_unused(visitor); + return visitor.template apply(); } }; diff --git a/include/boost/geometry/algorithms/detail/is_valid/linear.hpp b/include/boost/geometry/algorithms/detail/is_valid/linear.hpp index 69243563e..e30064faf 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/linear.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/linear.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -18,6 +19,7 @@ #include #include +#include #include #include @@ -138,7 +140,8 @@ public: static inline bool apply(MultiLinestring const& multilinestring, VisitPolicy& visitor) { - if (AllowEmptyMultiGeometries && boost::empty(multilinestring)) + if (BOOST_GEOMETRY_CONDITION( + AllowEmptyMultiGeometries && boost::empty(multilinestring))) { return visitor.template apply(); } diff --git a/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp b/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp index 781331d8e..0025445c2 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -22,6 +23,7 @@ #include #include +#include #include #include @@ -253,7 +255,8 @@ public: { typedef debug_validity_phase debug_phase; - if (AllowEmptyMultiGeometries && boost::empty(multipolygon)) + if (BOOST_GEOMETRY_CONDITION( + AllowEmptyMultiGeometries && boost::empty(multipolygon))) { return visitor.template apply(); } diff --git a/include/boost/geometry/algorithms/detail/is_valid/pointlike.hpp b/include/boost/geometry/algorithms/detail/is_valid/pointlike.hpp index 8e5ebaadc..e51ab7464 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/pointlike.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/pointlike.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -10,6 +11,7 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_POINTLIKE_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_POINTLIKE_HPP +#include #include #include @@ -17,6 +19,8 @@ #include #include +#include + namespace boost { namespace geometry { @@ -34,6 +38,7 @@ struct is_valid template static inline bool apply(Point const&, VisitPolicy& visitor) { + boost::ignore_unused(visitor); return visitor.template apply(); } }; @@ -51,7 +56,10 @@ struct is_valid static inline bool apply(MultiPoint const& multipoint, VisitPolicy& visitor) { - if (AllowEmptyMultiGeometries || boost::size(multipoint) > 0) + boost::ignore_unused(multipoint, visitor); + + if (BOOST_GEOMETRY_CONDITION( + AllowEmptyMultiGeometries || !boost::empty(multipoint))) { // we allow empty multi-geometries, so an empty multipoint // is considered valid diff --git a/include/boost/geometry/algorithms/detail/is_valid/ring.hpp b/include/boost/geometry/algorithms/detail/is_valid/ring.hpp index 941572b28..c35e84341 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/ring.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/ring.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -55,6 +56,8 @@ struct is_topologically_closed template static inline bool apply(Ring const&, VisitPolicy& visitor) { + boost::ignore_unused(visitor); + return visitor.template apply(); } }; diff --git a/include/boost/geometry/algorithms/detail/is_valid/segment.hpp b/include/boost/geometry/algorithms/detail/is_valid/segment.hpp index 0b60890dc..a93d2bfe9 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/segment.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/segment.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2014-2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -10,6 +11,8 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_SEGMENT_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_SEGMENT_HPP +#include + #include #include @@ -44,6 +47,8 @@ struct is_valid template static inline bool apply(Segment const& segment, VisitPolicy& visitor) { + boost::ignore_unused(visitor); + typename point_type::type p[2]; detail::assign_point_from_index<0>(segment, p[0]); detail::assign_point_from_index<1>(segment, p[1]); diff --git a/include/boost/geometry/policies/is_valid/failing_reason_policy.hpp b/include/boost/geometry/policies/is_valid/failing_reason_policy.hpp index b99803bea..d1918adbd 100644 --- a/include/boost/geometry/policies/is_valid/failing_reason_policy.hpp +++ b/include/boost/geometry/policies/is_valid/failing_reason_policy.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2015, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -13,6 +14,7 @@ #include #include +#include #include #include #include @@ -65,7 +67,8 @@ private: static inline validity_failure_type transform_failure_type(validity_failure_type failure) { - if (AllowDuplicates && failure == failure_duplicate_points) + if (BOOST_GEOMETRY_CONDITION( + AllowDuplicates && failure == failure_duplicate_points)) { return no_failure; } @@ -76,7 +79,8 @@ private: validity_failure_type transform_failure_type(validity_failure_type failure, bool is_linear) { - if (is_linear && AllowSpikes && failure == failure_spikes) + if (BOOST_GEOMETRY_CONDITION( + is_linear && AllowSpikes && failure == failure_spikes)) { return no_failure; } @@ -117,7 +121,7 @@ private: bool is_linear, SpikePoint const& spike_point) { - if (is_linear && AllowSpikes) + if (BOOST_GEOMETRY_CONDITION(is_linear && AllowSpikes)) { return; } @@ -167,7 +171,7 @@ private: static inline void apply(std::ostringstream& oss, Point const& point) { - if (AllowDuplicates) + if (BOOST_GEOMETRY_CONDITION(AllowDuplicates)) { return; }