summaryrefslogtreecommitdiff
path: root/src/tilearea_type.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tilearea_type.h')
-rw-r--r--src/tilearea_type.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tilearea_type.h b/src/tilearea_type.h
index e6d9bad60..b6af998a7 100644
--- a/src/tilearea_type.h
+++ b/src/tilearea_type.h
@@ -147,6 +147,36 @@ public:
* Allocate a new iterator that is a copy of this one.
*/
virtual TileIterator *Clone() const = 0;
+
+ /**
+ * Equality comparison.
+ */
+ bool operator ==(const TileIterator &rhs) const
+ {
+ return this->tile == rhs.tile;
+ }
+ /**
+ * Inequality comparison.
+ */
+ bool operator !=(const TileIterator &rhs) const
+ {
+ return this->tile != rhs.tile;
+ }
+
+ /**
+ * Equality comparison.
+ */
+ bool operator ==(const TileIndex &rhs) const
+ {
+ return this->tile == rhs;
+ }
+ /**
+ * Inequality comparison.
+ */
+ bool operator !=(const TileIndex &rhs) const
+ {
+ return this->tile != rhs;
+ }
};
/** Iterator to iterate over a tile area (rectangle) of the map. */