On 08/16/2012 06:56 PM, Michael Meeks wrote:
Sure - everyone's spent time doing that; like looking for:
if (a);
{
always_happens();
}
...which contemporary compilers warn about, anyway. -- But sure, they
could warn about the other case, too:
if (a)
sometimes_happens();
// some deceptively indented comment
always_happens();
Well - it seems that as each person touches the code, and has a
different view they change the local scope. c'est la vie. I usually try
to go for consistency in the function / module.
On that basis it's notable that you made that function inconsistent on
this topic :-)
Yes, using braces is one notable case where I deliberately deviate from
existing practice in a given file. (Though not in the question of
whether to place the opening brace on a line by itself, which can lead
to that excessive-looking vertical whitespace.)
Anyway, even if we agree to disagree here, the devilishly deceiving
cases I remember all involved if-sans-braces which originally covered a
single statement plus comment (as above), so maybe we can agree that at
least in such cases it doesn't harm to add redundant braces.
Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice