There are about 15 warnings when compiling with Visual Studio 2010 with /W4. For example, "conditional expression is constant" on "while (true)" - for (;;) should be used instead to avoid this warning.
Please post the warnings. Do not be bashful about posting lots of detail.
I do not agree that "while(true)" is undesirable. Visual Studio is not the gold standard, and I would argue that "for(;;)" is a possible typo. However, if blep does not mind, I am willing to replace those with for(;;).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please post the warnings. Do not be bashful about posting lots of detail.
I do not agree that "while(true)" is undesirable. Visual Studio is not the gold standard, and I would argue that "for(;;)" is a possible typo. However, if blep does not mind, I am willing to replace those with for(;;).
The opinion seems to be split on while(true): http://stackoverflow.com/questions/2611246/is-for-faster-than-while-true-if-not-why-do-people-use-it
I switched to for(;;) to avoid the constant condition warning which I don't want to disable.
I will try compiling json-cpp again and posting the full warning list.
We no longer use
while (CONSTANT)
in our codebase. We have also dropped thedo{...}while(0)
idiom from our macros, unhappily: