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 8989 - Class member variables have a ` m_ ` prefix.
9090 - Global variables have a ` g_ ` prefix.
9191 - 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.
9296 - Class names, function names, and method names are UpperCamelCase
9397 (PascalCase). Do not prefix class names with ` C ` .
9498 - Test suite naming convention: The Boost test suite in file
@@ -669,19 +673,19 @@ Foo(vec);
669673
670674``` cpp
671675enum class Tabs {
672- INFO ,
673- CONSOLE ,
674- GRAPH ,
675- PEERS
676+ info ,
677+ console ,
678+ network_graph ,
679+ peers
676680};
677681
678682int GetInt(Tabs tab)
679683{
680684 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;
685689 } // no default case, so the compiler can warn about missing cases
686690 assert (false);
687691}
You can’t perform that action at this time.
0 commit comments