[Freeciv-Dev] (PR#10533) bug: add next / add last no longer work as adve
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10533 >
This patch fixes it. The worklist functions seem to take (id, is_unit)
values unlike the (is_unit, id) values that I remember seeing everywhere
else. This might be worth fixing at some point (but then I'd really
just rather merge the unit and improvement types :-). Problem is the
way it is now there is no typesafety; even the "id" and "idx" parameters
to worklist functions are too easy to get backwards.
jason
? newtiles
Index: client/citydlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.c,v
retrieving revision 1.49
diff -u -r1.49 citydlg_common.c
--- client/citydlg_common.c 29 Sep 2004 02:24:18 -0000 1.49
+++ client/citydlg_common.c 15 Oct 2004 23:31:24 -0000
@@ -530,7 +530,7 @@
if (!item_is_unit && !can_eventually_build_improvement(pcity, item_id)) {
return FALSE;
}
- if (!worklist_insert(&pcity->worklist, item_is_unit, item_id,
+ if (!worklist_insert(&pcity->worklist, item_id, item_is_unit,
position - 1)) {
return FALSE;
}
@@ -543,7 +543,7 @@
if (!item_is_unit && !can_eventually_build_improvement(pcity, item_id)) {
return FALSE;
}
- if (!worklist_append(&pcity->worklist, item_is_unit, item_id)) {
+ if (!worklist_append(&pcity->worklist, item_id, item_is_unit)) {
return FALSE;
}
city_set_worklist(pcity, &pcity->worklist);
|
|