From a24b10a1e0bd91f6372e0a616c2045ee44dbc063 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 5 Feb 2015 18:45:16 -0800 Subject: [PATCH] Minor correction to CS. --- CodingStandards.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodingStandards.txt b/CodingStandards.txt index 6188b9a70..78885ce25 100644 --- a/CodingStandards.txt +++ b/CodingStandards.txt @@ -93,7 +93,7 @@ b. Only one per line. c. Associate */& with type, not variable (at ends with parser, but more readable, and safe if in conjunction with (b)). d. Favour declarations close to use; don't habitually declare at top of scope ala C. e. Always pass non-trivial parameters with a const& suffix. -f. If a function returns multiple values, use std::tuple (std::pair acceptable). Prefer not using */& arguments, except where efficiency requires. +f. If a func tion returns multiple values, use std::tuple (std::pair acceptable). Prefer not using */& arguments, except where efficiency requires. g. Never use a macro where adequate non-preprocessor C++ can be written. h. Prefer "using NewType = OldType" to "typedef OldType NewType". @@ -128,7 +128,7 @@ d. Use override, final and const judiciously. e. No implementations with the class declaration, except: - template or force-inline method (though prefer implementation at bottom of header file). - one-line implementation (in which case include it in same line as declaration). -f. For a method 'foo' +f. For a property 'foo' - Member: m_foo; - Getter: foo() [ also: for booleans, isFoo() ]; - Setter: setFoo();