[webkit-dev] Some new coding style rules

Tor Arne Vestbø tor.arne.vestbo at nokia.com
Thu Aug 5 02:48:47 PDT 2010


On 04.08.10 20.04, Adam Roben wrote:
> On Aug 4, 2010, at 7:15 AM, Jeremy Orlow wrote:
>
>> 2. ENABLE(FOO) #endif comments
>>
>> #if ENABLE(FOO)
>> ..
>> #endif // ENABLE(FOO)
>>
>> Shall we remove the comment, or require it explicitely in the style rules?
>
> I find these comments especially helpful when there are nested #ifs involved. I also find them helpful (though less so) when there are no nested #ifs, but a lot of code is between the #if/#endif. I don't find them useful when a whole file (either .h or .cpp) is compiled out.

I agree, nested #ifs, especially when non-indented, are a lot easier to 
read with ending comments.

Tor Arne



More information about the webkit-dev mailing list