summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fixedarray.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-07-08 13:06:44 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-07-08 23:47:51 +0200
commit3379a56f94788a78111c0842b8771da134e6061d (patch)
treec343bf758c1f0b49a0b40cd3ab3b385b3c0fcdf5 /crawl-ref/source/fixedarray.h
parentac04a5e73b7dd695f5f92ee492f8207e3de233c7 (diff)
downloadcrawl-ref-3379a56f94788a78111c0842b8771da134e6061d.tar.gz
crawl-ref-3379a56f94788a78111c0842b8771da134e6061d.zip
Adjust some whitespace and formatting.
Diffstat (limited to 'crawl-ref/source/fixedarray.h')
-rw-r--r--crawl-ref/source/fixedarray.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/crawl-ref/source/fixedarray.h b/crawl-ref/source/fixedarray.h
index 6425085912..59911c7099 100644
--- a/crawl-ref/source/fixedarray.h
+++ b/crawl-ref/source/fixedarray.h
@@ -11,8 +11,8 @@
// ==========================================================================
// class FixedArray
// ==========================================================================
-template <class TYPE, int WIDTH, int HEIGHT> class FixedArray {
-
+template <class TYPE, int WIDTH, int HEIGHT> class FixedArray
+{
//-----------------------------------
// Types
//
@@ -55,19 +55,23 @@ public:
// ----- Access -----
Column& operator[](unsigned long index) { return mData[index]; }
- const Column& operator[](unsigned long index) const {
+ const Column& operator[](unsigned long index) const
+ {
return mData[index];
}
- template<class Indexer> TYPE& operator () (const Indexer &i) {
+ template<class Indexer> TYPE& operator () (const Indexer &i)
+ {
return mData[i.x][i.y];
}
- template<class Indexer> const TYPE& operator () (const Indexer &i) const {
+ template<class Indexer> const TYPE& operator () (const Indexer &i) const
+ {
return mData[i.x][i.y];
}
- void init(const TYPE& def) {
+ void init(const TYPE& def)
+ {
for (int i = 0; i < WIDTH; ++i)
mData[i].init(def);
}
@@ -115,15 +119,18 @@ public:
int height() const { return data.height(); }
// ----- Access -----
- template<class Indexer> TYPE& operator () (const Indexer &i) {
+ template<class Indexer> TYPE& operator () (const Indexer &i)
+ {
return data[i.x+RADIUS][i.y+RADIUS];
}
- template<class Indexer> const TYPE& operator () (const Indexer &i) const {
+ template<class Indexer> const TYPE& operator () (const Indexer &i) const
+ {
return data[i.x+RADIUS][i.y+RADIUS];
}
- void init(const TYPE& def) {
+ void init(const TYPE& def)
+ {
data.init(def);
}