File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 89
89
- Class member variables have a ` m_ ` prefix.
90
90
- Global variables have a ` g_ ` prefix.
91
91
- Constant names are all uppercase, and use ` _ ` to separate words.
92
+ - Enumerator constants may be ` snake_case ` , ` PascalCase ` or ` ALL_CAPS ` .
93
+ This is a more tolerant policy than the [ C++ Core
94
+ Guidelines] ( https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps ) ,
95
+ which recommend using ` snake_case ` . Please use what seems appropriate.
92
96
- Class names, function names, and method names are UpperCamelCase
93
97
(PascalCase). Do not prefix class names with ` C ` .
94
98
- Test suite naming convention: The Boost test suite in file
@@ -669,19 +673,19 @@ Foo(vec);
669
673
670
674
``` cpp
671
675
enum class Tabs {
672
- INFO ,
673
- CONSOLE ,
674
- GRAPH ,
675
- PEERS
676
+ info ,
677
+ console ,
678
+ network_graph ,
679
+ peers
676
680
};
677
681
678
682
int GetInt(Tabs tab)
679
683
{
680
684
switch (tab) {
681
- case Tabs::INFO : return 0;
682
- case Tabs::CONSOLE : return 1;
683
- case Tabs::GRAPH : return 2;
684
- case Tabs::PEERS : return 3;
685
+ case Tabs::info : return 0;
686
+ case Tabs::console : return 1;
687
+ case Tabs::network_graph : return 2;
688
+ case Tabs::peers : return 3;
685
689
} // no default case, so the compiler can warn about missing cases
686
690
assert (false);
687
691
}
You can’t perform that action at this time.
0 commit comments