Follow-up Comment #30, patch #4830 (project freeciv):
> In multipliers.c: do multipliers, multiplier_count, and
> multiplier_used need the "static" keyword? I had thought this
> was necessary for persistent variables defined at file scope.
Good catch. They should not be globals but limited to module scope. I'll fix
> In handle_ruleset_multiplier(), is there a reason to use
> get_multiplier_count()+1 rather than get_multiplier_count()++
1) It would be very ugly to modify the return value of an function (what ISO
says about that?)
2) The increase would take place only after the value is used, i.e., the
parameter passed to set_multiplier_count() would be get_multiplier_count(). So
it would need to be ++get_multiplier_count()
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list