diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index 154d70038..8c649d659 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -23,6 +22,7 @@ #include #include +#include #include #include #include @@ -193,7 +193,7 @@ struct point_container_parser } typedef typename std::iterator_traits::difference_type size_type; - BOOST_ASSERT(num_points <= boost::uint32_t( (std::numeric_limits::max)() ) ); + BOOST_GEOMETRY_ASSERT(num_points <= boost::uint32_t( (std::numeric_limits::max)() ) ); size_type const container_size = static_cast(num_points); size_type const point_size = dimension::value * sizeof(double); @@ -237,7 +237,7 @@ struct linestring_parser return false; } - BOOST_ASSERT(it != end); + BOOST_GEOMETRY_ASSERT(it != end); return point_container_parser::parse(it, end, linestring, order); } }; diff --git a/include/boost/geometry/extensions/gis/io/wkb/utility.hpp b/include/boost/geometry/extensions/gis/io/wkb/utility.hpp index 86a559da7..99bcf92e5 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/utility.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/utility.hpp @@ -15,6 +15,10 @@ #include #include +#include +#include + +#include namespace boost { namespace geometry { @@ -85,7 +89,7 @@ bool wkb2hex(Iterator begin, Iterator end, std::string& hex) // because begin/end always are random access iterators. typename std::iterator_traits::difference_type diff = std::distance(begin, end); - BOOST_ASSERT(diff > 0); + BOOST_GEOMETRY_ASSERT(diff > 0); return hex.size() == 2 * std::string::size_type(diff); } diff --git a/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp b/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp index adcd3a16b..7e8d9244d 100644 --- a/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp +++ b/include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp @@ -38,7 +38,7 @@ #include #include -#include +#include namespace boost { namespace geometry { namespace projections { @@ -55,7 +55,7 @@ static const int APA_SIZE = 3; /* determine latitude from authalic latitude */ inline bool pj_authset(double es, double* APA) { - BOOST_ASSERT(0 != APA); + BOOST_GEOMETRY_ASSERT(0 != APA); double t = 0; @@ -75,7 +75,7 @@ inline bool pj_authset(double es, double* APA) inline double pj_authlat(double beta, const double* APA) { - BOOST_ASSERT(0 != APA); + BOOST_GEOMETRY_ASSERT(0 != APA); double const t = beta + beta; diff --git a/include/boost/geometry/extensions/index/rtree/rtree.hpp b/include/boost/geometry/extensions/index/rtree/rtree.hpp index 4a06bd6a0..a9e9ac6c8 100644 --- a/include/boost/geometry/extensions/index/rtree/rtree.hpp +++ b/include/boost/geometry/extensions/index/rtree/rtree.hpp @@ -435,7 +435,7 @@ private: if (n->is_leaf()) { - // TODO: mloskot - add assert(node.size() >= 2); or similar + // TODO: mloskot - add BOOST_GEOMETRY_ASSERT(node.size() >= 2); or similar typename rtree_leaf::leaf_map nodes = n->get_leaves(); unsigned int remaining = nodes.size() - 2; @@ -510,7 +510,7 @@ private: } else { - // TODO: mloskot - add assert(node.size() >= 2); or similar + // TODO: mloskot - add BOOST_GEOMETRY_ASSERT(node.size() >= 2); or similar typename rtree_node::node_map nodes = n->get_nodes(); unsigned int remaining = nodes.size() - 2; diff --git a/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp b/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp index c92df3750..d20304537 100644 --- a/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp +++ b/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp @@ -18,11 +18,12 @@ #include -#include #include #include #include +#include + #include // Helper geometry @@ -60,14 +61,14 @@ struct segment_returning_iterator { if (m_it != m_end) { - BOOST_ASSERT(m_prev != m_end); + BOOST_GEOMETRY_ASSERT(m_prev != m_end); ++m_it; } } reference operator*() { - BOOST_ASSERT(m_it != m_end && m_prev != m_end); + BOOST_GEOMETRY_ASSERT(m_it != m_end && m_prev != m_end); p1 = *m_prev; p2 = *m_it; diff --git a/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp b/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp index bdc20a369..2f57ae890 100644 --- a/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp +++ b/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp @@ -91,7 +91,7 @@ struct find_greatest_normalized_separation(lowest_high, highest_low); - // BOOST_ASSERT(0 <= width); + // BOOST_GEOMETRY_INDEX_ASSERT(0 <= width); if ( std::numeric_limits::epsilon() < width ) separation /= width; diff --git a/include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp b/include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp index 99b210d57..3ebed5ab0 100644 --- a/include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp +++ b/include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp @@ -15,9 +15,8 @@ #ifndef BOOST_GEOMETRY_EXTENSIONS_NSPHERE_STRATEGIES_CARTESIAN_POINT_IN_NSPHERE_HPP #define BOOST_GEOMETRY_EXTENSIONS_NSPHERE_STRATEGIES_CARTESIAN_POINT_IN_NSPHERE_HPP -#include - #include +#include #include #include #include @@ -75,7 +74,7 @@ struct point_in_nsphere // static bool apply(A const& a, B const& b) // { // // Assertion if called -// assert(false); +// BOOST_GEOMETRY_ASSERT(false); // return false; // } //};