Author: sveinung Date: Sat May 6 22:58:32 2017 New Revision: 35421 URL: http://svn.gna.org/viewcvs/freeciv?rev=35421&view=rev Log: action_has_result() doesn't modify its action.
Declare action_has_result()'s paction argument const. See Feature #657600 Modified: trunk/common/actions.c trunk/common/actions.h Modified: trunk/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=35421&r1=35420&r2=35421&view=diff ============================================================================== --- trunk/common/actions.c (original) +++ trunk/common/actions.c Sat May 6 22:58:32 2017 @@ -732,7 +732,8 @@ Returns TRUE iff performing the specified action has the specified result. **************************************************************************/ -bool action_has_result(struct action *paction, enum gen_action result) +bool action_has_result(const struct action *paction, + enum gen_action result) { /* The action result is currently used as the action id. */ return paction->id == result; Modified: trunk/common/actions.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.h?rev=35421&r1=35420&r2=35421&view=diff ============================================================================== --- trunk/common/actions.h (original) +++ trunk/common/actions.h Sat May 6 22:58:32 2017 @@ -353,7 +353,8 @@ int action_number(const struct action *action); -bool action_has_result(struct action *paction, enum gen_action result); +bool action_has_result(const struct action *paction, + enum gen_action result); #define action_id_has_result(action_id, result) \ action_has_result(action_by_number(action_id), result) _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits