[Freeciv-Dev] (PR#9397) remove rectangle_iterate
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#9397) remove rectangle_iterate |
From: |
"Jason Dorje Short" <jdorje@xxxxxxxxxxx> |
Date: |
Thu, 15 Jul 2004 19:17:26 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9397 >
This patch removes the unused rectangle_iterate. Not only is it unused
but it won't work for hex topologies, since (as may seem obvious) there
are no rectangles on a hexagonal grid.
jason
? cma.png
Index: common/map.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.h,v
retrieving revision 1.194
diff -u -r1.194 map.h
--- common/map.h 16 Jul 2004 02:10:34 -0000 1.194
+++ common/map.h 16 Jul 2004 02:11:14 -0000
@@ -439,21 +439,6 @@
} \
}
-#define rectangle_iterate(map_x0, map_y0, map_width, map_height, \
- x_itr, y_itr) \
-{ \
- int RI_dx_itr, RI_dy_itr; \
- for (RI_dy_itr = 0; RI_dy_itr < (map_height); RI_dy_itr++) { \
- for (RI_dx_itr = 0; RI_dx_itr < (map_width); RI_dx_itr++) { \
- int x_itr = RI_dx_itr + (map_x0), y_itr = RI_dy_itr + (map_y0); \
- if (normalize_map_pos(&x_itr, &y_itr)) {
-
-#define rectangle_iterate_end \
- } \
- } \
- } \
-}
-
/*
* Iterate through all tiles in a square with given center and radius.
* The position (x_itr, y_itr) that is returned will be normalized;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#9397) remove rectangle_iterate,
Jason Dorje Short <=
|
|