diff options
author | Max Lingua | 2009-07-12 05:34:46 +0000 |
---|---|---|
committer | Max Lingua | 2009-07-12 05:34:46 +0000 |
commit | 13a1dc0a58a33cdc974a877ccf6208890e9b4e9f (patch) | |
tree | 4f9fbc9d33625bb9b7b0d42bf3c2b82d7b410a09 | |
parent | 31a0c8090513023596351174aa48f787ca6384b3 (diff) | |
download | scummvm-rg350-13a1dc0a58a33cdc974a877ccf6208890e9b4e9f.tar.gz scummvm-rg350-13a1dc0a58a33cdc974a877ccf6208890e9b4e9f.tar.bz2 scummvm-rg350-13a1dc0a58a33cdc974a877ccf6208890e9b4e9f.zip |
Added a temporary work-around for PS2 backend in common/array.h
cause its vintage compiler does not support "new T[newCapacity]()"
but only "new T[newCapacity]", this will let it compile through.
It's ifdef'd as __PLAYSTATION2__, so it won't make a difference
for other backends with more modern tools.
svn-id: r42402
-rw-r--r-- | common/array.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/array.h b/common/array.h index 7852cabf06..ac8a4b20d7 100644 --- a/common/array.h +++ b/common/array.h @@ -222,7 +222,13 @@ public: T *old_storage = _storage; _capacity = newCapacity; + // PS2 gcc 3.2.2 can't do "new T[newCapacity]()" but only + // "new T[newCapacity]" -> quick fix until we update tools. + #ifndef __PLAYSTATION2__ _storage = new T[newCapacity](); + #else + _storage = new T[newCapacity]; + #endif assert(_storage); if (old_storage) { @@ -273,7 +279,13 @@ protected: // If there is not enough space, allocate more and // copy old elements over. uint newCapacity = roundUpCapacity(_size + n); + // PS2 gcc 3.2.2 can't do "new T[newCapacity]()" but only + // "new T[newCapacity]" -> quick fix until we update tools. + #ifndef __PLAYSTATION2__ newStorage = new T[newCapacity](); + #else + newStorage = new T[newCapacity]; + #endif assert(newStorage); copy(_storage, _storage + idx, newStorage); pos = newStorage + idx; |