[Scummvm-devel] Coding convention for empty while body?

Johannes Schickel lordhoto at scummvm.org
Sat Apr 3 00:55:35 CEST 2010


Thierry Crozat wrote:
>
> I looked at the coding convention page of the wiki and found no  
> convention about this. Should we for example fix the convention to  
> using braces?
> while (condition) {}
>
> In my opinion that makes it more clear that it was intentional to  
> have an empty while body. That would also removes the warnings.
>   

Personally I think that is fine, though IMHO this would be fine too:

while (...)
<tab>;

Though in both cases I would be in favor of a comment explaining why 
there's an empty body :-).

// Johannes




More information about the Scummvm-devel mailing list