fix overlaps(Range, Range)
This commit is contained in:
parent
42be2b23ca
commit
2b12b72d6e
|
@ -41,8 +41,8 @@ private:
|
||||||
|
|
||||||
inline bool overlaps(const Range& lhs, const Range& rhs)
|
inline bool overlaps(const Range& lhs, const Range& rhs)
|
||||||
{
|
{
|
||||||
return (lhs.first() <= rhs.first() and lhs.last() >= rhs.first()) or
|
return lhs.begin() <= rhs.begin() ? lhs.end() > rhs.begin()
|
||||||
(lhs.first() <= rhs.last() and lhs.last() >= rhs.last());
|
: lhs.begin() < rhs.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool touches(const Range& lhs, const Range& rhs)
|
inline bool touches(const Range& lhs, const Range& rhs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user