[Scummvm-devel] Revisiting coding convention for empty loop body

Adrian Frühwirth scummvm-devel at bonki.net
Sat Apr 21 16:14:34 CEST 2018


Hi,

Since we all agree that a mandatory {} is the best option I'll go ahead and update our CFCs and clean up the tree
accordingly.

Thanks everyone!

-Adrian

On 21.04.2018 15:19, Thierry Crozat wrote:
> Hi Adrian,
> 
> Although I have no recollection of the discussion you linked to, it looks like using {} is what I suggested back then,
> and I have not changed my mind since then. In addition of silencing the compiler warning, and being compact, it also in
> my opinion makes it more obvious to a human reading the code that this is intentional than using a space. So I would
> also vote for this option.
> 
> Thierry
> 
>> On 21 Apr 2018, at 13:46, Eugene Sandulenko <sev.mail at gmail.com <mailto:sev.mail at gmail.com>> wrote:
>>
>> On 21 April 2018 at 12:54, Paul Gilbert <paulfgilbert at gmail.com <mailto:paulfgilbert at gmail.com>> wrote:
>>
>>     Hmmm.. if we'd need to do some form of change to existing code to , I'd be more in favor of mandating the use of
>>     {} rather than the semicolon, as opposed to requiring an entire comment just to say that it's intentional that the
>>     loop doesn't have a body. It would convey the same information, in a more compact form. And it would have the
>>     advantage of bypassing the question of whether semicolons should have spaces in front of them.
>>
>>
>> I like this idea much more. I would even adjust the conventions to reflect it.
>>
>>
>> Eugene 
>> _______________________________________________
>> Scummvm-devel mailing list
>> Scummvm-devel at lists.scummvm.org <mailto:Scummvm-devel at lists.scummvm.org>
>> http://lists.scummvm.org/listinfo/scummvm-devel
> 



More information about the Scummvm-devel mailing list