Fix example for ES.70 (#1252)

As per #574, fixes the example in ES.70 to emphasize good use of a switch over a sequence of if-else-if statements.
pull/1255/head
Neil MacIntosh 8 years ago committed by Herb Sutter
parent d1def3290c
commit 0c7a349342

@ -12057,8 +12057,15 @@ Statements control the flow of control (except for function calls and exception
void use(int n) void use(int n)
{ {
switch (n) { // good switch (n) { // good
case 0: // ... case 0:
case 7: // ... // ...
break;
case 7:
// ...
break;
default:
// ...
break;
} }
} }

Loading…
Cancel
Save