changeset 1875:cfa171f52c3d

Rename few variables.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 04 Nov 2017 18:46:03 +0200
parents ce841c3d3f5f
children 6661014bc6c1
files mapsearch.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mapsearch.c	Sat Nov 04 17:42:09 2017 +0200
+++ b/mapsearch.c	Sat Nov 04 18:46:03 2017 +0200
@@ -557,7 +557,7 @@
 void mapBlockGetDimensions(const unsigned char *data, const size_t len, int *width, int *height)
 {
     size_t offs = 0;
-    int x = 0, x2 = 0;
+    int x1 = 0, x2 = 0;
 
     *width = *height = 0;
 
@@ -566,24 +566,24 @@
         const unsigned char ch = data[offs++];
         if (ch == '\n')
         {
-            if (x > *width)
-                *width = x;
+            if (x1 > *width)
+                *width = x1;
 
             (*height)++;
-            x = x2 = 0;
+            x1 = x2 = 0;
         }
         else
         {
             x2++;
             if (ch != ' ')
-                x = x2;
+                x1 = x2;
         }
     }
 
-    if (x > *width)
-        *width = x;
+    if (x1 > *width)
+        *width = x1;
 
-    if (x > 0)
+    if (x1 > 0)
         (*height)++;
 }