diff options
author | agent-q | 2011-05-21 15:48:44 +0100 |
---|---|---|
committer | agent-q | 2011-05-21 15:48:44 +0100 |
commit | 987d966acc72083d1c63926e719ee3198e24ec83 (patch) | |
tree | 4e4a4bbef346c93cc47a96ccc2177de9e5a52aa0 /common/array.h | |
parent | a9b5d5e2bb2109b4ae08971421623c60df67a223 (diff) | |
download | scummvm-rg350-987d966acc72083d1c63926e719ee3198e24ec83.tar.gz scummvm-rg350-987d966acc72083d1c63926e719ee3198e24ec83.tar.bz2 scummvm-rg350-987d966acc72083d1c63926e719ee3198e24ec83.zip |
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.
Diffstat (limited to 'common/array.h')
-rw-r--r-- | common/array.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |