X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fobjects%2Fgis-tile.h;h=06ce337af5443f191558a42644fb73404b337e7b;hp=c1e3ea77d999cbb155eacf4266545273ee970e24;hb=b87064909e6d20e1ee2995adae0c1ce5cb692d7e;hpb=7d7d6ae0531a85361ce0d8b997d988b653282847 diff --git a/src/objects/gis-tile.h b/src/objects/gis-tile.h index c1e3ea7..06ce337 100644 --- a/src/objects/gis-tile.h +++ b/src/objects/gis-tile.h @@ -59,14 +59,14 @@ typedef void (*GisTileLoadFunc)(GisTile *tile, gpointer user_data); typedef void (*GisTileFreeFunc)(GisTile *tile, gpointer user_data); /* Forech functions */ -#define gis_tile_foreach(tile, child) \ - for (int _x = 0; _x < G_N_ELEMENTS(tile->children); _x++) \ - for (int _y = 0; child = tile->children[_x][_y], \ - _y < G_N_ELEMENTS(tile->children[_x]); _y++) \ - -#define gis_tile_foreach_index(tile, x, y) \ - for (x = 0; x < G_N_ELEMENTS(tile->children); x++) \ - for (y = 0; y < G_N_ELEMENTS(tile->children[x]); y++) +#define gis_tile_foreach(parent, child) \ + for (int _x = 0; _x < G_N_ELEMENTS(parent->children); _x++) \ + for (int _y = 0; child = parent->children[_x][_y], \ + _y < G_N_ELEMENTS(parent->children[_x]); _y++) + +#define gis_tile_foreach_index(parent, x, y) \ + for (x = 0; x < G_N_ELEMENTS(parent->children); x++) \ + for (y = 0; y < G_N_ELEMENTS(parent->children[x]); y++) /* Path to string table, keep in sync with tile->children */ extern gchar *gis_tile_path_table[2][2];