overlaps takes Range parameters instead of Selection
This commit is contained in:
parent
5669d576fc
commit
892b65b355
|
@ -31,6 +31,12 @@ private:
|
|||
BufferIterator m_last;
|
||||
};
|
||||
|
||||
inline bool overlaps(const Range& lhs, const Range& rhs)
|
||||
{
|
||||
return (lhs.first() <= rhs.first() and lhs.last() >= rhs.first()) or
|
||||
(lhs.first() <= rhs.last() and lhs.last() >= rhs.last());
|
||||
}
|
||||
|
||||
using CaptureList = std::vector<String>;
|
||||
|
||||
// A selection is a Range, associated with a CaptureList
|
||||
|
@ -66,12 +72,6 @@ private:
|
|||
};
|
||||
using SelectionList = std::vector<Selection>;
|
||||
|
||||
inline bool overlaps(const Selection& lhs, const Selection& rhs)
|
||||
{
|
||||
return (lhs.first() <= rhs.first() and lhs.last() >= rhs.first()) or
|
||||
(lhs.first() <= rhs.last() and lhs.last() >= rhs.last());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // selection_hh_INCLUDED
|
||||
|
|
Loading…
Reference in New Issue
Block a user