Stefan wrote:
I think there was once a discussion about a FIXME_ONCE macro that took care of this. not sure what happened with that idea.
Judging by http://source.winehq.org/git/wine.git/commitdiff/45ead7fe85e7107de91bd79a8ce..., Alexandre's preferred idiom is static BOOL fixme_once; ... if(!fixme_once++) FIXME("Report bug to Aunt Tilly\n");
It occurs to me that #define WINE_ONCE(s) { static int once; if (!once++) s; } might suffice; you could then write WINE_ONCE(FIXME("Report bug to Aunt Tilly\n"));
The previous attempt was more complicated: http://marc.info/?l=wine-devel&m=129396741411607&w=2 - Dan
On Sat, Aug 6, 2011 at 10:52 PM, Dan Kegel dank@kegel.com wrote:
Stefan wrote:
I think there was once a discussion about a FIXME_ONCE macro that took care of this. not sure what happened with that idea.
Judging by http://source.winehq.org/git/wine.git/commitdiff/45ead7fe85e7107de91bd79a8ce..., Alexandre's preferred idiom is static BOOL fixme_once; ... if(!fixme_once++) FIXME("Report bug to Aunt Tilly\n");
Thanks Dan, I'll try to do something similar.
It occurs to me that #define WINE_ONCE(s) { static int once; if (!once++) s; } might suffice; you could then write WINE_ONCE(FIXME("Report bug to Aunt Tilly\n"));
The previous attempt was more complicated: http://marc.info/?l=wine-devel&m=129396741411607&w=2
Thanks for giving a shot too. It's sad that there isn't a macro for this yet. My FIXMEs are in a loop that might be called thousands of times (potentially for each vertex in a mesh), so it be could be extremely noisy.
Cheers, Michael Mc Donnell