[Scummvm-cvs-logs] CVS: scummvm/common stream.cpp,1.6,1.7

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Sun Jan 9 06:58:09 CET 2005


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22485

Modified Files:
	stream.cpp 
Log Message:
Since _pos is unsigned it's always >= 0, so testing for negativity will
generate a warning in GCC.


Index: stream.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/stream.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- stream.cpp	9 Jan 2005 01:41:43 -0000	1.6
+++ stream.cpp	9 Jan 2005 14:57:41 -0000	1.7
@@ -27,7 +27,7 @@
 
 void MemoryReadStream::seek(int32 offs, int whence) {
 	// Pre-Condition
-	assert(0 <= _pos && _pos <= _bufSize);
+	assert(_pos <= _bufSize);
 	switch (whence) {
 	case SEEK_END:
 		// SEEK_END works just like SEEK_SET, only 'reversed',
@@ -45,7 +45,7 @@
 		break;
 	}
 	// Post-Condition
-	assert(0 <= _pos && _pos <= _bufSize);
+	assert(_pos <= _bufSize);
 }
 
 





More information about the Scummvm-git-logs mailing list