Author: cazfi
Date: Fri Sep  4 22:32:12 2015
New Revision: 29774

URL: http://svn.gna.org/viewcvs/freeciv?rev=29774&view=rev
Log:
Fixed -WShadow warnings from Governor code.

See bug #23806

Modified:
    branches/S2_6/common/aicore/cm.c

Modified: branches/S2_6/common/aicore/cm.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/aicore/cm.c?rev=29774&r1=29773&r2=29774&view=diff
==============================================================================
--- branches/S2_6/common/aicore/cm.c    (original)
+++ branches/S2_6/common/aicore/cm.c    Fri Sep  4 22:32:12 2015
@@ -766,11 +766,11 @@
        (Specialists may also be making angry citizens content, requiring
        additional luxuries, but we don't try to consider that here; this
        just means we might explore some solutions unnecessarily.) */
-    int specialists = city_specialists(pcity);
+    int specialist_count = city_specialists(pcity);
     int max_content = player_content_citizens(city_owner(pcity));
 
     state->min_luxury = surplus[O_LUXURY] 
-       + game.info.happy_cost*MAX(specialists - max_content, 0)
+       + game.info.happy_cost * MAX(specialist_count - max_content, 0)
        + 1;
   }
 
@@ -1642,12 +1642,12 @@
      FIXME: this heuristic will break in rulesets where specialists can
      influence happiness other than by direct production of luxury. */
   {
-    int specialists = specialists_in_solution(state, &state->current);
+    int specialist_count = specialists_in_solution(state, &state->current);
     int max_content = player_content_citizens(city_owner(state->pcity));
     int specialists_suppress_unhappy
-      = MAX(specialists + state->current.idle - max_content, 0);
+      = MAX(specialist_count + state->current.idle - max_content, 0);
     int max_luxury = production[O_LUXURY]
-          + game.info.happy_cost*specialists_suppress_unhappy;
+          + game.info.happy_cost * specialists_suppress_unhappy;
  
     if (max_luxury < state->min_luxury ) {
       log_base(LOG_PRUNE_BRANCH, "--- pruning: disorder (%d + %d*%d < %d)",


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

Reply via email to