[Freeciv-Dev] Re: (PR#3413) Wrong use of enum impr_range and/or enum eff
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] Re: (PR#3413) Wrong use of enum impr_range and/or enum effect_range |
From: |
"Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx> |
Date: |
Thu, 13 Feb 2003 08:10:42 -0800 |
On Thu, Feb 13, 2003 at 07:20:06AM -0800, Mike Kaufman wrote:
> On Thu, Feb 13, 2003 at 03:48:08AM -0800, Raimar Falke wrote:
> >
> >
> > city_add_improvement calls improvements_update_redundant with type
> > enum effect_range but the function expects enum impr_range range.
>
> fix attached.
You missed one in packets.h. This is only based on reportings by the
compiler. I have no clue about this.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"There are three ways to get something done. Do it yourself, hire someone
to do it for you or forbid your kids to do it."
Index: common/improvement.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/improvement.h,v
retrieving revision 1.19
diff -u -u -r1.19 improvement.h
--- common/improvement.h 2003/02/12 22:22:33 1.19
+++ common/improvement.h 2003/02/13 16:08:59
@@ -66,6 +66,17 @@
* to hold full number of improvement types. */
#define B_LAST MAX_NUM_ITEMS
+/* Range of equivalence (used in equiv_range fields)
+ * These must correspond to impr_range_names[] in improvement.c. */
+enum impr_range {
+ IR_NONE,
+ IR_CITY,
+ IR_ISLAND,
+ IR_PLAYER,
+ IR_WORLD,
+ IR_LAST /* keep this last */
+};
+
/* Range of effects (used in equiv_range and effect.range fields)
* These must correspond to effect_range_names[] in improvement.c. */
enum effect_range {
@@ -184,7 +195,7 @@
Impr_Type_id bldg_req; /* B_LAST = none required */
enum tile_terrain_type *terr_gate; /* list; T_LAST terminated */
enum tile_special_type *spec_gate; /* list; S_NO_SPECIAL terminated */
- enum effect_range equiv_range;
+ enum impr_range equiv_range;
Impr_Type_id *equiv_dupl; /* list; B_LAST terminated */
Impr_Type_id *equiv_repl; /* list; B_LAST terminated */
Tech_Type_id obsolete_by; /* A_LAST = never obsolete */
@@ -202,17 +213,6 @@
extern struct impr_type improvement_types[B_LAST];
-
-/* Range of equivalence (used in equiv_range fields)
- * These must correspond to impr_range_names[] in improvement.c. */
-enum impr_range {
- IR_NONE,
- IR_CITY,
- IR_ISLAND,
- IR_PLAYER,
- IR_WORLD,
- IR_LAST /* keep this last */
-};
/* impr range id/string converters */
enum impr_range impr_range_from_str(const char *str);
Index: common/packets.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.h,v
retrieving revision 1.138
diff -u -u -r1.138 packets.h
--- common/packets.h 2003/02/10 21:43:42 1.138
+++ common/packets.h 2003/02/13 16:09:10
@@ -653,7 +653,7 @@
Impr_Type_id bldg_req;
enum tile_terrain_type *terr_gate;
enum tile_special_type *spec_gate;
- enum effect_range equiv_range;
+ enum impr_range equiv_range;
Impr_Type_id *equiv_dupl;
Impr_Type_id *equiv_repl;
Tech_Type_id obsolete_by;
|
|