Author: cazfi Date: Fri Sep 4 22:32:19 2015 New Revision: 29775 URL: http://svn.gna.org/viewcvs/freeciv?rev=29775&view=rev Log: Fixed -WShadow warnings from Governor code.
See bug #23806 Modified: branches/S2_5/common/aicore/cm.c Modified: branches/S2_5/common/aicore/cm.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/aicore/cm.c?rev=29775&r1=29774&r2=29775&view=diff ============================================================================== --- branches/S2_5/common/aicore/cm.c (original) +++ branches/S2_5/common/aicore/cm.c Fri Sep 4 22:32:19 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