From 7859dd2ac89ed078692cd370b3bdb43740298c5e Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 23 Jun 2014 17:03:49 +1000 Subject: Use Range type for hotspot to simplify manipulation. --- src/Document.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Document.h') diff --git a/src/Document.h b/src/Document.h index 8212db674..a59f192a9 100644 --- a/src/Document.h +++ b/src/Document.h @@ -39,6 +39,10 @@ public: start(start_), end(end_) { } + bool operator==(const Range &other) const { + return (start == other.start) && (end == other.end); + } + bool Valid() const { return (start != invalidPosition) && (end != invalidPosition); } -- cgit v1.2.3