diff options
Diffstat (limited to 'crawl-ref/source/FixAry.h')
-rw-r--r-- | crawl-ref/source/FixAry.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/FixAry.h b/crawl-ref/source/FixAry.h index 4270949150..3db9d49abd 100644 --- a/crawl-ref/source/FixAry.h +++ b/crawl-ref/source/FixAry.h @@ -58,6 +58,16 @@ public: // ----- Access ----- Column& operator[](unsigned long index) {return mData[index];} const Column& operator[](unsigned long index) const {return mData[index];} + template<class Indexer> TYPE& operator () (const Indexer &i) + { + return mData[i.x][i.y]; + } + + template<class Indexer> const TYPE& operator () (const Indexer &i) + const + { + return mData[i.x][i.y]; + } //----------------------------------- // Member Data |