On 2019-10-15 11:57, Moses McKnight wrote:
On 10/15/19 1:41 PM, Seth Hillbrand wrote:
4) Single-line statements after if/else don't get brackets {}
Is that actually part of the kicad code standard?!? Every standard
and recommendation I've ever seen recommends/requires the opposite to
prevent future errors (see for instance:
https://barrgroup.com/Embedded-Systems/Books/Embedded-C-Coding-Standard/General-Rules/Braces)
Moses
I should have expounded a bit more. Braces are optional[1]. They
should be used to help to clarify code, intent or structure. In the
patch submitted, braces were not consistently used for single-line
statements. The ones that were used were not needed and added extra
vertical space making reading the small function more difficult. This
was the root of comment (4)
Best-
Seth
Seth Hillbrand
KiCad Services Corporation
https://www.kipro-pcb.com
+1 530 302 5483 | +1 212 603 9372
[1]
https://kicad-source-mirror.readthedocs.io/en/stable/Documentation/development/coding-style-policy/#47-braces-braces
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp