Chromium Code Reviews| Index: src/scanner.h |
| diff --git a/src/scanner.h b/src/scanner.h |
| index 5162fbec12d0bfec37a7c8847e7a6400b84b58c0..4d7411f54fdfde593d4b553874d7c78e98de4a2f 100644 |
| --- a/src/scanner.h |
| +++ b/src/scanner.h |
| @@ -355,6 +355,14 @@ class Scanner { |
| int beg_pos; |
| int end_pos; |
| + |
| + bool inline operator==(const Location& other) const { |
| + return beg_pos == other.beg_pos && end_pos == other.end_pos; |
| + } |
| + |
| + bool inline operator!=(const Location& other) const { |
| + return !(*this == other); |
| + } |
| }; |
| // -1 is outside of the range of any real source code. |