Re: (PR#14863) compile fix for aiparatrooper.c

"Mike Kaufman" <[email protected]> Tue, 13 Dec 2005 22:50:09 -0800
Newsgroups gmane.games.freeciv.ai
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1134543009-32370-0
Content-Type: text/plain; charset="utf-8"


<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14863 >

I should have know better. Here's a another compile fix, in the same vein.

-mike


------------=_1134543009-32370-0
Content-Type: text/plain; charset="us-ascii"; name="aiparatrooper2.diff"
Content-Disposition: inline; filename="aiparatrooper2.diff"
Content-Transfer-Encoding: 7bit

Index: ai/aiparatrooper.c
===================================================================
--- ai/aiparatrooper.c	(revision 11349)
+++ ai/aiparatrooper.c	(working copy)
@@ -320,6 +320,8 @@
   }
 
   unit_type_iterate(u_type) {
+    struct unit *virtual_unit;
+
     if (!unit_type_flag(u_type, F_PARATROOPERS)) {
       continue;
     }
@@ -343,9 +345,8 @@
     }
 
     /* it's worth building that unit? */
-    struct unit *virtual_unit = create_unit_virtual(pplayer, pcity, u_type,
-						    do_make_unit_veteran
-						    (pcity, u_type));
+    virtual_unit = create_unit_virtual(pplayer, pcity, u_type,
+                                       do_make_unit_veteran(pcity, u_type));
     profit = calculate_want_for_paratrooper(virtual_unit, pcity->tile);
     destroy_unit_virtual(virtual_unit);
 

------------=_1134543009-32370-0--