changeset 1880:6d42169d60aa

Rename some variables.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 04 Nov 2017 20:24:42 +0200
parents ec322c22ed59
children 07658e9da93c
files mapsearch.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mapsearch.c	Sat Nov 04 20:24:17 2017 +0200
+++ b/mapsearch.c	Sat Nov 04 20:24:42 2017 +0200
@@ -651,14 +651,11 @@
         return -1;
 
     // Collect sums into entropy array
-    for (int y = 0; y < map->height; y++)
+    for (int yc = 0; yc < map->height; yc++)
     {
-        unsigned char *c = map->data + (y * map->scansize);
-        for (int x = 0; x < map->width; x++)
-        {
-            list[*c]++;
-            c++;
-        }
+        unsigned char *sp = map->data + (yc * map->scansize);
+        for (int xc = 0; xc < map->width; xc++)
+            list[sp[xc]]++;
     }
 
     // Handle exclusions