Page 1 of 1

specialist iterator continue and break macros

Posted: Fri Dec 22, 2017 10:59 am
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?

Re: specialist iterator continue and break macros

Posted: Sat Dec 23, 2017 6:22 am
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?