Do we want to force braces even for 1 line if/for/etc?

Oliver Sander oliver.sander at tu-dresden.de
Fri Aug 28 20:35:34 BST 2020


I am not a fan of these braces---I think they add extra boilerplate lines
without making the code easier to read.

On 21.08.20 01:19, Albert Astals Cid wrote:
> Most of the guidelines suggest it so that you don't forget to add them when adding a new line in the "block".

g++ warns me when I write stuff like

if (foo)
  do_something();
  do_something_more();

For me this is good enough.

Best,
Oliver

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5198 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20200828/42ef6280/attachment.bin>


More information about the Okular-devel mailing list