Skip to content

Commit

Permalink
libshell: Added equality operator for Range
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 19, 2013
1 parent 7d9e6a1 commit f29a9d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/libshell/include/de/shell/libshell.h
Expand Up @@ -49,6 +49,9 @@ struct LIBSHELL_PUBLIC Range
Range(int a = 0, int b = 0) : start(a), end(b) {}
inline int size() const { return end - start; }
inline bool contains(int i) const { return i >= start && i < end; }
inline bool operator == (Range const &other) const {
return start == other.start && end == other.end;
}
};

/// Word wrapping.
Expand Down

0 comments on commit f29a9d9

Please sign in to comment.