From 892b65b3550d00bfd6e79ac925c0196b2e508557 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 11 Dec 2012 14:11:33 +0100 Subject: [PATCH] overlaps takes Range parameters instead of Selection --- src/selection.hh | 12 ++++++------ 1 file 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; // A selection is a Range, associated with a CaptureList @@ -66,12 +72,6 @@ private: }; using SelectionList = std::vector; -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