Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3450) square_iterate and unreal positions
Home

[Freeciv-Dev] (PR#3450) square_iterate and unreal positions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3450) square_iterate and unreal positions
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 23 Feb 2003 15:25:25 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Mon Feb 17 08:08:37 2003]:

> For some reason square_iterate calls CHECK_MAP_POS on its center tile. 
> This is a problem since it only shows up in debug mode and is not 
> obvious to the programmer.  And I really don't know why it does that (I 
> wrote the code for it, some time ago).
> 
> This CHECK_MAP_POS should probably be removed.

And the patch.

jason

Index: common/map.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.h,v
retrieving revision 1.140
diff -u -r1.140 map.h
--- common/map.h        2003/02/20 09:45:21     1.140
+++ common/map.h        2003/02/23 23:24:30
@@ -426,7 +426,6 @@
 {                                                                             \
   int dx_itr, dy_itr;                                                         \
   bool _is_border = IS_BORDER_MAP_POS((center_x), (center_y), (radius));      \
-  CHECK_MAP_POS((center_x), (center_y));                                      \
   for (dy_itr = -(radius); dy_itr <= (radius); dy_itr++) {                    \
     for (dx_itr = -(radius); dx_itr <= (radius); dx_itr++) {                  \
       int x_itr = dx_itr + (center_x), y_itr = dy_itr + (center_y);           \

[Prev in Thread] Current Thread [Next in Thread]