Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13001) [PATCH] Remove unused function get_building_for
Home

[Freeciv-Dev] (PR#13001) [PATCH] Remove unused function get_building_for

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13001) [PATCH] Remove unused function get_building_for_effect
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sat, 7 May 2005 06:52:34 -0700
Reply-to: bugs@xxxxxxxxxxx

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

What the subject says. To commit ASAP.


Index: common/effects.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.c,v
retrieving revision 1.38
diff -u -u -r1.38 effects.c
--- common/effects.c    6 May 2005 16:01:42 -0000       1.38
+++ common/effects.c    7 May 2005 13:51:11 -0000
@@ -524,21 +524,6 @@
 }
 
 /**************************************************************************
-  Get a building which grants this effect. Returns B_LAST if there is none.
-**************************************************************************/
-Impr_type_id get_building_for_effect(enum effect_type effect_type)
-{
-  effect_list_iterate(get_effects(effect_type), peffect) {
-    requirement_list_iterate(peffect->reqs, preq) {
-      if (preq->source.type == REQ_BUILDING) {
-       return preq->source.value.building;
-      }
-    } requirement_list_iterate_end;
-  } effect_list_iterate_end;
-  return B_LAST;
-}
-
-/**************************************************************************
   Returns TRUE if the building has any effect bonuses of the given type.
 
   Note that this function returns a boolean rather than an integer value
Index: common/effects.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/effects.h,v
retrieving revision 1.23
diff -u -u -r1.23 effects.h
--- common/effects.h    6 May 2005 16:01:42 -0000       1.23
+++ common/effects.h    7 May 2005 13:51:11 -0000
@@ -216,7 +216,6 @@
 
 Impr_type_id ai_find_source_building(struct player *pplayer,
                                     enum effect_type effect_type);
-Impr_type_id get_building_for_effect(enum effect_type effect_type);
 
 #endif  /* FC__EFFECTS_H */
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13001) [PATCH] Remove unused function get_building_for_effect, Vasco Alexandre da Silva Costa <=