summaryrefslogtreecommitdiff
path: root/src/misc/array.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-16 14:22:19 +0000
committerfrosch <frosch@openttd.org>2010-01-16 14:22:19 +0000
commit6465f02fba984e169c904cccf89fd1417ee2f45b (patch)
tree1708196e69bfc12f14fe47743e26be39c5c1ae65 /src/misc/array.hpp
parent84ece021fde4850b4755b81bb6886ffced6b7020 (diff)
downloadopenttd-6465f02fba984e169c904cccf89fd1417ee2f45b.tar.xz
(svn r18826) -Codechange: Unifiy return value of (SmallArray|FixedSizeArray)::(Append|AppendC) with other containers. (skidd13)
Diffstat (limited to 'src/misc/array.hpp')
-rw-r--r--src/misc/array.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc/array.hpp b/src/misc/array.hpp
index e4cf19408..78dd0098f 100644
--- a/src/misc/array.hpp
+++ b/src/misc/array.hpp
@@ -35,7 +35,7 @@ protected:
SubArray& s = data[super_size - 1];
if (!s.IsFull()) return s;
}
- return data.AppendC();
+ return *data.AppendC();
}
public:
@@ -56,9 +56,9 @@ public:
/** return true if array is full */
FORCEINLINE bool IsFull() { return data.IsFull() && data[N - 1].IsFull(); }
/** allocate but not construct new item */
- FORCEINLINE T& Append() { return FirstFreeSubArray().Append(); }
+ FORCEINLINE T *Append() { return FirstFreeSubArray().Append(); }
/** allocate and construct new item */
- FORCEINLINE T& AppendC() { return FirstFreeSubArray().AppendC(); }
+ FORCEINLINE T *AppendC() { return FirstFreeSubArray().AppendC(); }
/** indexed access (non-const) */
FORCEINLINE T& operator [] (uint index)
{