From f09fd7b50e3c8b507697398180cd90cfbc75a41f Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 24 Aug 2023 17:56:37 +0200 Subject: [PATCH] Update CONTRIBUTING.md small update for coding style --- CONTRIBUTING.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 560a7097..61b8f88d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,11 @@ if (a == b) { } ``` +```cpp +if (a == b) doStuff(a); +``` + +less readable, but acceptable in some cases: ```cpp if (a == b) { @@ -30,9 +35,6 @@ if (a == b) } ``` -```cpp -if (a == b) doStuff(a); -``` There should always be a space between a keyword and its condition and between the condition and brace. Within the condition, no space should be between the paranthesis and variables. @@ -75,4 +77,4 @@ Good: There is no set character limit for a comment within a line, though as a rule of thumb you should wrap your comment if it exceeds the width of your editor window. -Inline comments are OK if they describe that line only and are not exceedingly wide. \ No newline at end of file +Inline comments are OK if they describe that line only and are not exceedingly wide.