diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-12-11 14:11:33 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-12-13 18:49:29 +0100 |
| commit | 892b65b3550d00bfd6e79ac925c0196b2e508557 (patch) | |
| tree | 227b4b6b3116c09faf030fe6de8062dcfb851c27 /src | |
| parent | 5669d576fc2a6a7a1e56e5c92e193bd3a7cf803c (diff) | |
overlaps takes Range parameters instead of Selection
Diffstat (limited to 'src')
| -rw-r--r-- | src/selection.hh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/selection.hh b/src/selection.hh index 5b5b5217..8ea0fa97 100644 --- a/src/selection.hh +++ b/src/selection.hh @@ -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 |
