From 6465f02fba984e169c904cccf89fd1417ee2f45b Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 16 Jan 2010 14:22:19 +0000 Subject: (svn r18826) -Codechange: Unifiy return value of (SmallArray|FixedSizeArray)::(Append|AppendC) with other containers. (skidd13) --- src/misc/fixedsizearray.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc/fixedsizearray.hpp') diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp index 435dfad79..5d52c2881 100644 --- a/src/misc/fixedsizearray.hpp +++ b/src/misc/fixedsizearray.hpp @@ -93,9 +93,9 @@ public: /** return true if array is empty */ FORCEINLINE bool IsEmpty() const { return Length() <= 0; }; /** add (allocate), but don't construct item */ - FORCEINLINE T& Append() { assert(!IsFull()); return data[SizeRef()++]; } + FORCEINLINE T *Append() { assert(!IsFull()); return &data[SizeRef()++]; } /** add and construct item using default constructor */ - FORCEINLINE T& AppendC() { T& item = Append(); new(&item)T; return item; } + FORCEINLINE T *AppendC() { T *item = Append(); new(item)T; return item; } /** return item by index (non-const version) */ FORCEINLINE T& operator [] (uint index) { assert(index < Length()); return data[index]; } /** return item by index (const version) */ -- cgit v1.2.3-54-g00ecf