mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Merge pull request #1013 from franzhollerer/opening_brace_in_same_line_as_switch
opening brace in same line with switch statement to be aligned with NL.17
This commit is contained in:
commit
e5e7082efa
|
@ -11001,8 +11001,7 @@ If you really need to break out a loop, a `break` is typically better than alter
|
|||
|
||||
##### Example
|
||||
|
||||
switch (eventType)
|
||||
{
|
||||
switch (eventType) {
|
||||
case Information:
|
||||
update_status_bar();
|
||||
break;
|
||||
|
@ -11015,8 +11014,7 @@ If you really need to break out a loop, a `break` is typically better than alter
|
|||
|
||||
It is easy to overlook the fallthrough. Be explicit:
|
||||
|
||||
switch (eventType)
|
||||
{
|
||||
switch (eventType) {
|
||||
case Information:
|
||||
update_status_bar();
|
||||
break;
|
||||
|
@ -11030,8 +11028,7 @@ It is easy to overlook the fallthrough. Be explicit:
|
|||
|
||||
In C++17, use a `[[fallthrough]]` annotation:
|
||||
|
||||
switch (eventType)
|
||||
{
|
||||
switch (eventType) {
|
||||
case Information:
|
||||
update_status_bar();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user