diff options
author | Samuel Bronson <naesten@gmail.com> | 2013-03-24 16:30:31 -0400 |
---|---|---|
committer | Samuel Bronson <naesten@gmail.com> | 2013-03-24 16:30:31 -0400 |
commit | 9826b8029a10c3c3d1cb9e2299811d8720510f26 (patch) | |
tree | 00ba9151944569787cf4475b55fdc387b0a0172b /crawl-ref/source/coordit.h | |
parent | fe444ccd2c5713bbae4402149d67ae468dfd33dc (diff) | |
download | crawl-ref-9826b8029a10c3c3d1cb9e2299811d8720510f26.tar.gz crawl-ref-9826b8029a10c3c3d1cb9e2299811d8720510f26.zip |
More PURE, and introduce REALLYPURE as well.
Diffstat (limited to 'crawl-ref/source/coordit.h')
-rw-r--r-- | crawl-ref/source/coordit.h | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/crawl-ref/source/coordit.h b/crawl-ref/source/coordit.h index eb2d59448d..74ae22d878 100644 --- a/crawl-ref/source/coordit.h +++ b/crawl-ref/source/coordit.h @@ -8,9 +8,9 @@ class rectangle_iterator : public iterator<forward_iterator_tag, coord_def> public: rectangle_iterator(const coord_def& corner1, const coord_def& corner2); explicit rectangle_iterator(int x_border_dist, int y_border_dist = -1); - operator bool() const; - coord_def operator *() const; - const coord_def* operator->() const; + operator bool() const PURE; + coord_def operator *() const PURE; + const coord_def* operator->() const PURE; void operator ++ (); void operator ++ (int); @@ -26,16 +26,16 @@ class circle_iterator public: circle_iterator(const circle_def &circle_); - operator bool() const; - coord_def operator*() const; + operator bool() const PURE; + coord_def operator *() const PURE; - void operator++(); - void operator++(int); + void operator ++ (); + void operator ++ (int); }; -/* - * radius_iterator: Iterator over coordinates in a more-or-less - * circular region. +/** + * @class radius_iterator + * Iterator over coordinates in a more-or-less circular region. * * The region can be any circle_def; furthermore, the cells can * be restricted to lie within some LOS field (need not be @@ -59,9 +59,9 @@ public: radius_iterator(const los_base* los, bool exclude_center = false); - operator bool() const; - coord_def operator *() const; - const coord_def* operator->() const; + operator bool() const PURE; + coord_def operator *() const PURE; + const coord_def *operator->() const PURE; void operator ++ (); void operator ++ (int); @@ -93,9 +93,11 @@ public: radius_iterator(pos, 1, C_POINTY, NULL, _exclude_center) {} }; -/* distance_iterator: Iterates over coordinates in integer ranges. Unlike other - * iterators, it tries hard to not favorize any particular - * direction (unless fair = false, when it saves some CPU). +/* @class distance_iterator + * Iterates over coordinates in integer ranges. + * + * Unlike other iterators, it tries hard to not favorize any + * particular direction (unless fair = false, when it saves some CPU). */ class distance_iterator : public iterator<forward_iterator_tag, coord_def> { @@ -104,11 +106,11 @@ public: bool _fair = true, bool exclude_center = true, int _max_radius = GDM); - operator bool() const; - coord_def operator *() const; - const coord_def* operator->() const; + operator bool() const PURE; + coord_def operator *() const PURE; + const coord_def *operator->() const PURE; - const distance_iterator& operator ++(); + const distance_iterator &operator ++(); void operator ++(int); int radius() const; private: |