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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Nov 11 12:40:00 CET 2007


Revision: 29476
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29476&view=rev
Author:   lordhoto
Date:     2007-11-11 03:39:59 -0800 (Sun, 11 Nov 2007)

Log Message:
-----------
Cleanup.

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

Modified: scummvm/trunk/common/array.h
===================================================================
--- scummvm/trunk/common/array.h	2007-11-11 11:08:58 UTC (rev 29475)
+++ scummvm/trunk/common/array.h	2007-11-11 11:39:59 UTC (rev 29476)
@@ -53,8 +53,7 @@
 	}
 
 	~Array() {
-		if (_data)
-			delete [] _data;
+		delete [] _data;
 	}
 
 	void push_back(const T& element) {
@@ -100,8 +99,7 @@
 		if (this == &array)
 			return *this;
 
-		if (_data)
-			delete [] _data;
+		delete [] _data;
 		_size = array._size;
 		_capacity = _size + 32;
 		_data = new T[_capacity];
@@ -115,10 +113,8 @@
 	}
 
 	void clear() {
-		if (_data) {
-			delete [] _data;
-			_data = 0;
-		}
+		delete [] _data;
+		_data = 0;
 		_size = 0;
 		_capacity = 0;
 	}


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