| [Freeciv-Dev] Re: buglet in normalization in  init_new_game()  (PR#1063)[Top] [All Lists][Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
 At 10:06 AM 01/12/05 -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
>Raimar Falke wrote:
>One point, though: the use of code like
>
>int _center_x = (center_x), _center_y = (center_y);
>
>in
>
>#define blah_blah_blah(center_x, center_y, ...)
>{
>   int _center_x = (center_x), _center_y = (center_y);
>   /* ... */
>
>isn't just style.  The purpose is to prevent center_x/center_y from 
>being evaluated more than once, in case they're expressions with side 
>effects.  However, note: (1) there is no such usage anywhere in the code 
>(nor should there be), 
> (2) most other macros don't make this safety 
>guarantee, 
[...]
>  So doing without 
>should be fine.
>
>jason
That's really a sensible coding practice - good thing its just a game :-).
Cheers,
RossW
=====
 
 |  |