From 79dd574a655c792b7830ce57dde0fe8697618961 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 11 Dec 2017 10:59:07 -0800 Subject: [PATCH] Fix #1004 --- CppCoreGuidelines.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e943bb2..1057fe1 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -12191,8 +12191,9 @@ If you really need to break out a loop, a `break` is typically better than alter break; case Warning: write_event_log(); + // Bad - implicit fallthrough case Error: - display_error_window(); // Bad + display_error_window(); break; } @@ -12206,7 +12207,7 @@ It is easy to overlook the fallthrough. Be explicit: write_event_log(); // fallthrough case Error: - display_error_window(); // Bad + display_error_window(); break; } @@ -12220,7 +12221,7 @@ In C++17, use a `[[fallthrough]]` annotation: write_event_log(); [[fallthrough]]; // C++17 case Error: - display_error_window(); // Bad + display_error_window(); break; }