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
that.

> 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:

  <http://gna.org/patch/?4830>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to