[Scummvm-cvs-logs] CVS: scummvm 2xsai.cpp,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Sun May 5 11:06:03 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv8918

Modified Files:
	2xsai.cpp 
Log Message:
minimal optimization <g>

Index: 2xsai.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/2xsai.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- 2xsai.cpp	4 May 2002 00:05:45 -0000	1.5
+++ 2xsai.cpp	5 May 2002 18:05:56 -0000	1.6
@@ -740,7 +740,7 @@
 	unsigned nextlineDst = dstPitch / sizeof(short);
 	short* q = (short*)dstPtr;
 
-	for(int j = 0; j < height; ++j) {
+	while (height--) {
 		for(int i = 0; i < width; ++i) {
 			// short A = *(p + i - nextlineSrc - 1);
 			short B = *(p + i - nextlineSrc);
@@ -768,7 +768,7 @@
 {
 	uint8* r;
 
-	for(int j = 0; j < height; ++j) {
+	while (height--) {
 		r = dstPtr;
 		for(int i = 0; i < width; ++i, ++r) {
 			uint8 color = *(srcPtr + i );
@@ -785,7 +785,7 @@
 {
 	uint8* r;
 
-	for(int j = 0; j < height; ++j) {
+	while (height--) {
 		r = dstPtr;
 		for(int i = 0; i < width; ++i, r+=2) {
 			uint8 color = *(srcPtr + i );
@@ -806,7 +806,7 @@
 	uint8* r;
 	uint32 dstPitch2 = dstPitch << 1;
 
-	for(int j = 0; j < height; ++j) {
+	while (height--) {
 		r = dstPtr;
 		for(int i = 0; i < width; ++i, r+=3) {
 			uint8 color = *(srcPtr + i);





More information about the Scummvm-git-logs mailing list