Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7302) Avoid unneeded checks for goto
Home

[Freeciv-Dev] (PR#7302) Avoid unneeded checks for goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7302) Avoid unneeded checks for goto
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 24 Jan 2004 03:18:48 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7302 >


get_drawn call normalize_map_pos 4 times. This is quite much. We can
avoid this very easy.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "This is Linux Country. On a quiet night, you can hear Windows reboot."

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.72
diff -u -u -r1.72 mapview_common.c
--- client/mapview_common.c     2004/01/16 02:08:50     1.72
+++ client/mapview_common.c     2004/01/24 11:14:52
@@ -807,7 +807,7 @@
                      NORMAL_TILE_WIDTH, NORMAL_TILE_HEIGHT);
   }
 
-  if (!citymode) {
+  if (!citymode && goto_is_active()) {
     /* put any goto lines on the tile. */
     if (is_real) {
       enum direction8 dir;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7302) Avoid unneeded checks for goto, Raimar Falke <=