Author: sveinung
Date: Wed Jul 13 03:46:02 2016
New Revision: 33241

URL: http://svn.gna.org/viewcvs/freeciv?rev=33241&view=rev
Log:
actions: free the name act_prob

...so it can be used as a name for the action probability struct.

See patch #7466

Modified:
    trunk/client/gui-sdl2/action_dialog.c
    trunk/common/actions.c
    trunk/common/actions.h

Modified: trunk/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=33241&r1=33240&r2=33241&view=diff
==============================================================================
--- trunk/client/gui-sdl2/action_dialog.c       (original)
+++ trunk/client/gui-sdl2/action_dialog.c       Wed Jul 13 03:46:02 2016
@@ -1148,13 +1148,13 @@
   possible).
 **************************************************************************/
 static const char *action_custom_text(const int action_id,
-                                      const action_probability act_prob,
+                                      const action_probability prob,
                                       const struct city *actor_homecity,
                                       const struct city *target_city)
 {
   static struct astring custom = ASTRING_INIT;
 
-  if (!action_prob_possible(act_prob)) {
+  if (!action_prob_possible(prob)) {
     /* No info since impossible. */
     return NULL;
   }

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=33241&r1=33240&r2=33241&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Wed Jul 13 03:46:02 2016
@@ -615,24 +615,24 @@
   Suitable for a tool tip for the button that starts it.
 **************************************************************************/
 const char *action_get_tool_tip(const int action_id,
-                                const action_probability act_prob)
+                                const action_probability prob)
 {
   static struct astring tool_tip = ASTRING_INIT;
 
-  if (action_prob_is_signal(act_prob)) {
-    if (action_prob_unknown(act_prob)) {
+  if (action_prob_is_signal(prob)) {
+    if (action_prob_unknown(prob)) {
       /* Missing in game knowledge. An in game action can change this. */
       astr_set(&tool_tip,
                _("Starting to do this may currently be impossible."));
     } else {
-      fc_assert(action_prob_not_impl(act_prob));
+      fc_assert(action_prob_not_impl(prob));
 
       /* Missing server support. No in game action will change this. */
       astr_clear(&tool_tip);
     }
   } else {
     /* The unit is 0.5% chance of success. */
-    const double converted = (double)act_prob / 2.0;
+    const double converted = (double)prob / 2.0;
 
     astr_set(&tool_tip, _("The probability of success is %.1f%%."),
              converted);

Modified: trunk/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.h?rev=33241&r1=33240&r2=33241&view=diff
==============================================================================
--- trunk/common/actions.h      (original)
+++ trunk/common/actions.h      Wed Jul 13 03:46:02 2016
@@ -317,7 +317,7 @@
                                    const action_probability prob,
                                    const char *custom);
 const char *action_get_tool_tip(const int action_id,
-                                const action_probability act_prob);
+                                const action_probability prob);
 
 struct action_enabler_list *
 action_enablers_for_action(enum gen_action action);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to