Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2265) Remove unused parameter
Home

[Freeciv-Dev] Re: (PR#2265) Remove unused parameter

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2265) Remove unused parameter
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 6 Nov 2002 04:23:21 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, Nov 05, 2002 at 03:16:28PM -0800, Per I. Mathisen via RT wrote:
> 
> [rfalke - Fri Nov  1 11:49:36 2002]:
> > dio_put_worklist requires the bool real_wl which is wrong for two
> > reasons:
> >  - the two callers should supply FALSE instead of TRUE because a city
> >  worklist is not a real worklist (i.e. has no name)
> >  - nobody will transfer real worklists anymore. Global worklists are
> >  saved at the client.
> 
> I can't see any patch attached to this issue.

ARGL.

Index: common/dataio.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/dataio.c,v
retrieving revision 1.4
diff -u -r1.4 dataio.c
--- common/dataio.c     2002/10/09 13:31:09     1.4
+++ common/dataio.c     2002/11/01 11:39:59
@@ -385,19 +385,14 @@
 /**************************************************************************
 ...
 **************************************************************************/
-void dio_put_worklist(struct data_out *dout, const struct worklist *pwl,
-                     bool real_wl)
+void dio_put_worklist(struct data_out *dout, const struct worklist *pwl)
 {
   dio_put_bool8(dout, pwl->is_valid);
 
   if (pwl->is_valid) {
     int i, length = worklist_length(pwl);
 
-    if (real_wl) {
-      dio_put_string(dout, pwl->name);
-    } else {
-      dio_put_string(dout, "\0");
-    }
+    dio_put_string(dout, "");
 
     dio_put_uint8(dout, length);
     for (i = 0; i < length; i++) {
Index: common/dataio.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/dataio.h,v
retrieving revision 1.1
diff -u -r1.1 dataio.h
--- common/dataio.h     2002/09/19 14:39:37     1.1
+++ common/dataio.h     2002/11/01 11:39:59
@@ -94,8 +94,7 @@
 void dio_put_bit_string(struct data_out *dout, const char *value);
 void dio_put_city_map(struct data_out *dout, const char *value);
 void dio_put_tech_list(struct data_out *dout, const int *value);
-void dio_put_worklist(struct data_out *dout, const struct worklist *pwl,
-                     bool real_wl);
+void dio_put_worklist(struct data_out *dout, const struct worklist *pwl);
 
 void dio_put_uint8_vec8(struct data_out *dout, int *values, int stop_value);
 void dio_put_uint16_vec8(struct data_out *dout, int *values, int stop_value);
Index: common/packets.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v
retrieving revision 1.220
diff -u -r1.220 packets.c
--- common/packets.c    2002/10/27 22:42:18     1.220
+++ common/packets.c    2002/11/01 11:40:06
@@ -774,7 +774,7 @@
   dio_put_uint8(&dout, packet->worker_y);
   dio_put_uint8(&dout, packet->specialist_from);
   dio_put_uint8(&dout, packet->specialist_to);
-  dio_put_worklist(&dout, &copy, TRUE);
+  dio_put_worklist(&dout, &copy);
   if (req_type == PACKET_CITY_RENAME) {
     dio_put_string(&dout, packet->name);
   } else {
@@ -1278,7 +1278,7 @@
   dio_put_uint16(&dout, req->disbanded_shields);
   dio_put_uint16(&dout, req->caravan_shields);
 
-  dio_put_worklist(&dout, &req->worklist, TRUE);
+  dio_put_worklist(&dout, &req->worklist);
 
   dio_put_uint8(&dout, (COND_SET_BIT(req->is_building_unit, 0) |
                        COND_SET_BIT(req->did_buy, 1) |

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