[extensions][gis] Replace assert with BOOST_ASSERT

This commit is contained in:
Adam Wulkiewicz
2014-07-08 01:49:30 +02:00
parent 5ffe29f82a
commit 78ac419c2a
2 changed files with 7 additions and 4 deletions

View File

@@ -15,6 +15,7 @@
#include <iterator>
#include <limits>
#include <boost/assert.hpp>
#include <boost/concept_check.hpp>
#include <boost/cstdint.hpp>
#include <boost/type_traits/is_integral.hpp>
@@ -199,7 +200,7 @@ struct point_container_parser
}
typedef typename std::iterator_traits<Iterator>::difference_type size_type;
assert(num_points <= boost::uint32_t( (std::numeric_limits<size_type>::max)() ) );
BOOST_ASSERT(num_points <= boost::uint32_t( (std::numeric_limits<size_type>::max)() ) );
size_type const container_size = static_cast<size_type>(num_points);
size_type const point_size = dimension<point_type>::value * sizeof(double);
@@ -248,7 +249,7 @@ struct linestring_parser
return false;
}
assert(it != end);
BOOST_ASSERT(it != end);
return point_container_parser<L>::parse(it, end, linestring, order);
}
};

View File

@@ -38,6 +38,8 @@
#include <cassert>
#include <cmath>
#include <boost/assert.hpp>
namespace boost { namespace geometry { namespace projections {
namespace detail {
@@ -53,7 +55,7 @@ static const int APA_SIZE = 3;
/* determine latitude from authalic latitude */
inline void pj_authset(double es, double* APA)
{
assert(0 != APA);
BOOST_ASSERT(0 != APA);
double t = 0;
@@ -72,7 +74,7 @@ inline void pj_authset(double es, double* APA)
inline double pj_authlat(double beta, const double* APA)
{
assert(0 != APA);
BOOST_ASSERT(0 != APA);
double const t = beta + beta;