From 3f06f6f67a751fd5ce943e118b4f9dc15898c288 Mon Sep 17 00:00:00 2001 From: Guille Gutierrez Date: Wed, 19 Apr 2023 11:16:17 -0400 Subject: [PATCH] Update 'C++GUIDE.md' add indentation section and correct header wards --- C++GUIDE.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/C++GUIDE.md b/C++GUIDE.md index cfcd900..bad8f81 100644 --- a/C++GUIDE.md +++ b/C++GUIDE.md @@ -48,12 +48,12 @@ Copyright © 2022 Concordia CERC group Project Coder Guillermo Gutierrez Morote */ -#ifndef SAMPLE_PERSON_H_ -#define SAMPLE_PERSON_H_ +#ifndef SAMPLE_PERSON_HPP_ +#define SAMPLE_PERSON_HPP_ ... -#endif //SAMPLE_PERSON_H_ +#endif //SAMPLE_PERSON_HPP_ ``` @@ -70,15 +70,15 @@ Copyright © 2022 Concordia CERC group Project Coder Guillermo Gutierrez Morote */ -#ifndef SAMPLE_PERSON_H_ -#define SAMPLE_PERSON_H_ +#ifndef SAMPLE_PERSON_HPP_ +#define SAMPLE_PERSON_HPP_ namespace sample { } -#endif //SAMPLE_PERSON_H_ +#endif //SAMPLE_PERSON_HPP_ ``` @@ -99,8 +99,8 @@ Copyright © 2022 Concordia CERC group Project Coder Guillermo Gutierrez Morote */ -#ifndef SAMPLE_PERSON_H_ -#define SAMPLE_PERSON_H_ +#ifndef SAMPLE_PERSON_HPP_ +#define SAMPLE_PERSON_HPP_ #include @@ -109,7 +109,7 @@ namespace sample { } -#endif //SAMPLE_PERSON_H_ +#endif //SAMPLE_PERSON_HPP_ ``` @@ -133,6 +133,10 @@ namespace sample { Ensure that your imports are used and remove any unused. +### Indentation + +We indent with 2 spaces as it's considered more consistent when using different editors and operationg systems while provide enoug readability for the hierarchies. + ### Multiplatform CERC team is aiming to create platform independent open software, therefore the use of platform specific libraries is discouraged, if such thing can't be avoided, try to provide platform alternatives by using compiler directives. @@ -184,8 +188,8 @@ Project Coder Guillermo Gutierrez Morote @@ -203,7 +207,7 @@ namespace sample { } } -#endif //SAMPLE_PERSON_H_ +#endif //SAMPLE_PERSON_HPP_ ```