[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]
Raimar Falke wrote:
<snip: circle_iterate patch>
Attached is an updated version which contains mostly style and comment
changes.
All of this looks good.
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, and (3) in the case of wrapper macros, these names can
sometimes conflict with each other (with bad results). So doing without
should be fine.
jason
|
|