Don't collect invalid bounding boxes (ref #3709)
This commit is contained in:
parent
0a15a955a2
commit
a408b0732e
1 changed files with 7 additions and 4 deletions
|
@ -61,10 +61,13 @@ struct push_box_impl
|
||||||
template <typename T0, typename T1, typename T2, typename T3>
|
template <typename T0, typename T1, typename T2, typename T3>
|
||||||
void operator() (T0 & boxes, T1 const& begin, T2 const& box, T3 const& range) const
|
void operator() (T0 & boxes, T1 const& begin, T2 const& box, T3 const& range) const
|
||||||
{
|
{
|
||||||
boxes.emplace_back(box,
|
if (box.valid())
|
||||||
std::make_pair(std::distance(begin,
|
{
|
||||||
range.begin()),
|
boxes.emplace_back(box,
|
||||||
std::distance(range.begin(), range.end())));
|
std::make_pair(std::distance(begin,
|
||||||
|
range.begin()),
|
||||||
|
std::distance(range.begin(), range.end())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue