Changed some for-loops to be a bit more clear.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 13 Jul 2013 21:56:31 -0400
changeset 7441 468877c2135a
parent 7440 9817477202d1
child 7442 a65a1c17af2b
Changed some for-loops to be a bit more clear.
src/video/SDL_video.c
--- a/src/video/SDL_video.c	Sat Jul 13 21:50:40 2013 -0400
+++ b/src/video/SDL_video.c	Sat Jul 13 21:56:31 2013 -0400
@@ -663,7 +663,7 @@
     /* Make sure we don't already have the mode in the list */
     modes = display->display_modes;
     nmodes = display->num_display_modes;
-    for (i = nmodes; i--;) {
+    for (i = 0; i < nmodes; ++i) {
         if (cmpmodes(mode, &modes[i]) == 0) {
             return SDL_FALSE;
         }
@@ -2253,7 +2253,7 @@
     }
     _this->VideoQuit(_this);
 
-    for (i = _this->num_displays; i--;) {
+    for (i = 0; i < _this->num_displays; ++i) {
         SDL_VideoDisplay *display = &_this->displays[i];
         for (j = display->num_display_modes; j--;) {
             if (display->display_modes[j].driverdata) {