Author: sveinung Date: Mon May 11 04:30:21 2015 New Revision: 29043 URL: http://svn.gna.org/viewcvs/freeciv?rev=29043&view=rev Log: Get rid of action_enabler_append_hard()
The function action_enabler_append_hard() was used to append requirements to the requirement vector of action enablers. Remove it. Requested by Emmet Hikory <persia> and Marko Lindqvist <cazfi> See patch #4997 Modified: trunk/common/actions.c trunk/common/actions.h trunk/server/ruleset.c Modified: trunk/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=29043&r1=29042&r2=29043&view=diff ============================================================================== --- trunk/common/actions.c (original) +++ trunk/common/actions.c Mon May 11 04:30:21 2015 @@ -402,18 +402,6 @@ } /************************************************************************** - Some actions have hard requirements that can be expressed as normal - requirement vectors. Append those to the action enabler so the action - struct won't need those fields. - - Reconsider this choice if many enablers for each action should become - common. -**************************************************************************/ -void action_enabler_append_hard(struct action_enabler *enabler) -{ -} - -/************************************************************************** Get all enablers for an action. **************************************************************************/ struct action_enabler_list * Modified: trunk/common/actions.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.h?rev=29043&r1=29042&r2=29043&view=diff ============================================================================== --- trunk/common/actions.h (original) +++ trunk/common/actions.h Mon May 11 04:30:21 2015 @@ -209,7 +209,6 @@ struct action_enabler *action_enabler_new(void); void action_enabler_add(struct action_enabler *enabler); -void action_enabler_append_hard(struct action_enabler *enabler); bool is_action_enabled_unit_on_city(const enum gen_action wanted_action, const struct unit *actor_unit, Modified: trunk/server/ruleset.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=29043&r1=29042&r2=29043&view=diff ============================================================================== --- trunk/server/ruleset.c (original) +++ trunk/server/ruleset.c Mon May 11 04:30:21 2015 @@ -5322,12 +5322,6 @@ } requirement_vector_copy(&enabler->target_reqs, target_reqs); - - /* Append the actions hard requirements when the rules are loaded - * to play the game. */ - if (act) { - action_enabler_append_hard(enabler); - } action_enabler_add(enabler); } section_list_iterate_end; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits