Author: sveinung
Date: Sat May  6 23:02:15 2017
New Revision: 35429

URL: http://svn.gna.org/viewcvs/freeciv?rev=35429&view=rev
Log:
action_has_result() doesn't modify its action.

Declare action_has_result()'s paction argument const.

See Feature #657600

Modified:
    branches/S3_0/common/actions.c
    branches/S3_0/common/actions.h

Modified: branches/S3_0/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/actions.c?rev=35429&r1=35428&r2=35429&view=diff
==============================================================================
--- branches/S3_0/common/actions.c      (original)
+++ branches/S3_0/common/actions.c      Sat May  6 23:02:15 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: branches/S3_0/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/actions.h?rev=35429&r1=35428&r2=35429&view=diff
==============================================================================
--- branches/S3_0/common/actions.h      (original)
+++ branches/S3_0/common/actions.h      Sat May  6 23:02:15 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

Reply via email to