From 987d966acc72083d1c63926e719ee3198e24ec83 Mon Sep 17 00:00:00 2001 From: agent-q Date: Sat, 21 May 2011 15:48:44 +0100 Subject: DS: Prevent arrays from growing by 32 elements inside 'operator='. I'm concerned that this could increase memory usage on the DS, but too scared to make the change for all builds of ScummVM. --- common/array.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/array.h b/common/array.h index e3aab66dc6..383ecfcec6 100644 --- a/common/array.h +++ b/common/array.h @@ -182,7 +182,11 @@ public: delete[] _storage; _size = array._size; +#ifdef __DS__ + _capacity = _size; +#else _capacity = _size + 32; +#endif _storage = new T[_capacity]; assert(_storage); copy(array._storage, array._storage + _size, _storage); -- cgit v1.2.3