summaryrefslogtreecommitdiff
path: root/src/misc/fixedsizearray.hpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2015-08-08 10:06:24 +0000
committeralberth <alberth@openttd.org>2015-08-08 10:06:24 +0000
commitb885d79f506bde93b4ab278b3f84b8ca6254f3b9 (patch)
treeed7e027c4444181baab5b4ef6b667cd179f29a65 /src/misc/fixedsizearray.hpp
parent9cadc0e1504cf979c14e1cb42bfe51a29675dd81 (diff)
downloadopenttd-b885d79f506bde93b4ab278b3f84b8ca6254f3b9.tar.xz
(svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods.
Diffstat (limited to 'src/misc/fixedsizearray.hpp')
-rw-r--r--src/misc/fixedsizearray.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp
index 4216570b8..bf0f3acdd 100644
--- a/src/misc/fixedsizearray.hpp
+++ b/src/misc/fixedsizearray.hpp
@@ -63,7 +63,7 @@ public:
}
/** Copy constructor. Preallocate space for items and header, then initialize header. */
- FixedSizeArray(const FixedSizeArray<T, C>& src)
+ FixedSizeArray(const FixedSizeArray<T, C> &src)
{
/* share block (header + items) with the source array */
data = src.data;
@@ -106,9 +106,9 @@ public:
/** add and construct item using default constructor */
inline T *AppendC() { T *item = Append(); new(item)T; return item; }
/** return item by index (non-const version) */
- inline T& operator [] (uint index) { assert(index < Length()); return data[index]; }
+ inline T& operator[](uint index) { assert(index < Length()); return data[index]; }
/** return item by index (const version) */
- inline const T& operator [] (uint index) const { assert(index < Length()); return data[index]; }
+ inline const T& operator[](uint index) const { assert(index < Length()); return data[index]; }
};
#endif /* FIXEDSIZEARRAY_HPP */