mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
[example] Replace assert with BOOST_ASSERT
This commit is contained in:
parent
869cff7004
commit
99b27c611a
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <boost/assert.hpp>
|
||||||
|
|
||||||
#include <boost/iterator.hpp>
|
#include <boost/iterator.hpp>
|
||||||
#include <boost/iterator/iterator_adaptor.hpp>
|
#include <boost/iterator/iterator_adaptor.hpp>
|
||||||
#include <boost/iterator/iterator_categories.hpp>
|
#include <boost/iterator/iterator_categories.hpp>
|
||||||
@ -43,14 +45,14 @@ class my_polygon
|
|||||||
// Const access
|
// Const access
|
||||||
my_point const& get_point(std::size_t i) const
|
my_point const& get_point(std::size_t i) const
|
||||||
{
|
{
|
||||||
assert(i < points.size());
|
BOOST_ASSERT(i < points.size());
|
||||||
return points[i];
|
return points[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mutable access
|
// Mutable access
|
||||||
my_point & get_point(std::size_t i)
|
my_point & get_point(std::size_t i)
|
||||||
{
|
{
|
||||||
assert(i < points.size());
|
BOOST_ASSERT(i < points.size());
|
||||||
return points[i];
|
return points[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user