mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Added break to each case in switch statement
This commit is contained in:
@@ -2206,9 +2206,9 @@ We might write
|
|||||||
bool owned;
|
bool owned;
|
||||||
owner<istream*> inp;
|
owner<istream*> inp;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case std_in: owned = false; inp = &cin;
|
case std_in: owned = false; inp = &cin; break;
|
||||||
case command_line: owned = true; inp = new istringstream{argv[2]};
|
case command_line: owned = true; inp = new istringstream{argv[2]}; break;
|
||||||
case file: owned = true; inp = new ifstream{argv[2]};
|
case file: owned = true; inp = new ifstream{argv[2]}; break;
|
||||||
}
|
}
|
||||||
istream& in = *inp;
|
istream& in = *inp;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user