specialist iterator continue and break macros

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
Post Reply
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

specialist iterator continue and break macros

Post by Lachu »

In some case that's not correct to use break or continue in Freeciv iterator macros. Why not create macros to handle break or continue inside iterator macros?
User avatar
dunnoob
Elite
Posts: 327
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: specialist iterator continue and break macros

Post by dunnoob »

Lachu wrote:In some case that's not correct to use break or continue in Freeciv iterator macros. Why not create macros to handle break or continue inside iterator macros?
I consider the SPECENUM and iterator stuff as holy code, a suggestion to change it is an auto-WONTFIX just like a suggestion to use Python or C++ instead of C. :P Seriously, utitlity/iterator.h mumbles something about invalid_iterator_init() at the end, and common/map.c actually uses invalid_iterator_init(), could this do what you want?
Post Reply