[Scummvm-cvs-logs] SF.net SVN: scummvm:[42455] scummvm/trunk/common/array.h

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Jul 14 00:08:59 CEST 2009


Revision: 42455
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42455&view=rev
Author:   fingolfin
Date:     2009-07-13 22:08:56 +0000 (Mon, 13 Jul 2009)

Log Message:
-----------
Unify PS2 and non-PS2 alloc code in Common::Array code (if this causes regressions somewhere, we better find a fix that also works on PS2)

Modified Paths:
--------------
    scummvm/trunk/common/array.h

Modified: scummvm/trunk/common/array.h
===================================================================
--- scummvm/trunk/common/array.h	2009-07-13 21:27:58 UTC (rev 42454)
+++ scummvm/trunk/common/array.h	2009-07-13 22:08:56 UTC (rev 42455)
@@ -222,13 +222,7 @@
 
 		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) {
@@ -279,13 +273,7 @@
 				// 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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list