[algorithms][num_points] in the range_count class, include the test for n == 0

inside the same if as AddForOpen (much like the previous implementation for this
class)
This commit is contained in:
Menelaos Karavelas 2014-08-12 00:33:03 +03:00
parent e472d4b439
commit fab29b52e2

View File

@ -64,11 +64,8 @@ struct range_count
static inline std::size_t apply(Range const& range)
{
std::size_t n = boost::size(range);
if ( n == 0 )
{
return 0;
}
if (AddForOpen
&& n > 0
&& geometry::closure<Range>::value == open
&& detail::disjoint::disjoint_point_point(range::front(range),
range::at(range, n - 1))