[Freeciv-Dev] (PR#14863) compile fix for aiparatrooper.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14863 >
a more pedantic compiler doesn't like this code. committing immediately.
-mike
Index: ai/aiparatrooper.c
===================================================================
--- ai/aiparatrooper.c (revision 11348)
+++ ai/aiparatrooper.c (working copy)
@@ -252,17 +252,16 @@
square_iterate(ptile_city, range, ptile) {
int multiplier;
+ struct city *pcity = tile_get_city(ptile);
- if (!map_is_known(ptile, pplayer)) {
- continue;
- }
-
- struct city* pcity = tile_get_city(ptile);
-
if (!pcity) {
continue;
}
+ if (!map_is_known(ptile, pplayer)) {
+ continue;
+ }
+
/* We prefer jumping to other continents. On the same continent we
* can fight traditionally */
if (tile_get_continent(ptile_city) != tile_get_continent(ptile)) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#14863) compile fix for aiparatrooper.c,
Mike Kaufman <=
|
|