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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon May 4 17:04:39 CEST 2009


Revision: 40304
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40304&view=rev
Author:   fingolfin
Date:     2009-05-04 15:04:39 +0000 (Mon, 04 May 2009)

Log Message:
-----------
COMMON: Made Array::resize() init/zero the memory it allocates

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

Modified: scummvm/trunk/common/array.h
===================================================================
--- scummvm/trunk/common/array.h	2009-05-04 15:04:26 UTC (rev 40303)
+++ scummvm/trunk/common/array.h	2009-05-04 15:04:39 UTC (rev 40304)
@@ -195,7 +195,7 @@
 
 		T *old_storage = _storage;
 		_capacity = newCapacity;
-		_storage = new T[newCapacity];
+		_storage = new T[newCapacity]();
 		assert(_storage);
 
 		if (old_storage) {


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