Author: sveinung
Date: Wed Jul 13 03:46:48 2016
New Revision: 33242

URL: http://svn.gna.org/viewcvs/freeciv?rev=33242&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:
    branches/S2_6/client/gui-sdl/action_dialog.c
    branches/S2_6/client/gui-sdl2/action_dialog.c
    branches/S2_6/common/actions.c
    branches/S2_6/common/actions.h

Modified: branches/S2_6/client/gui-sdl/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl/action_dialog.c?rev=33242&r1=33241&r2=33242&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl/action_dialog.c        (original)
+++ branches/S2_6/client/gui-sdl/action_dialog.c        Wed Jul 13 03:46:48 2016
@@ -870,13 +870,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: branches/S2_6/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl2/action_dialog.c?rev=33242&r1=33241&r2=33242&view=diff
==============================================================================
--- branches/S2_6/client/gui-sdl2/action_dialog.c       (original)
+++ branches/S2_6/client/gui-sdl2/action_dialog.c       Wed Jul 13 03:46:48 2016
@@ -873,13 +873,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: branches/S2_6/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/actions.c?rev=33242&r1=33241&r2=33242&view=diff
==============================================================================
--- branches/S2_6/common/actions.c      (original)
+++ branches/S2_6/common/actions.c      Wed Jul 13 03:46:48 2016
@@ -365,24 +365,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: branches/S2_6/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/actions.h?rev=33242&r1=33241&r2=33242&view=diff
==============================================================================
--- branches/S2_6/common/actions.h      (original)
+++ branches/S2_6/common/actions.h      Wed Jul 13 03:46:48 2016
@@ -158,7 +158,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