chore: Annotate fallthrough switch paths with FALLTHROUGH

The compiler was throwing errors about unannotated fallthroughs when
building with GN.
This commit is contained in:
Jeremy Apthorp 2018-06-20 12:54:42 -07:00
parent 3f40e93ba7
commit 8ccb5cc6eb
4 changed files with 26 additions and 2 deletions

View file

@ -88,87 +88,108 @@ ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted) {
case ')':
*shifted = true;
FALLTHROUGH;
case '0':
return ui::VKEY_0;
case '!':
*shifted = true;
FALLTHROUGH;
case '1':
return ui::VKEY_1;
case '@':
*shifted = true;
FALLTHROUGH;
case '2':
return ui::VKEY_2;
case '#':
*shifted = true;
FALLTHROUGH;
case '3':
return ui::VKEY_3;
case '$':
*shifted = true;
FALLTHROUGH;
case '4':
return ui::VKEY_4;
case '%':
*shifted = true;
FALLTHROUGH;
case '5':
return ui::VKEY_5;
case '^':
*shifted = true;
FALLTHROUGH;
case '6':
return ui::VKEY_6;
case '&':
*shifted = true;
FALLTHROUGH;
case '7':
return ui::VKEY_7;
case '*':
*shifted = true;
FALLTHROUGH;
case '8':
return ui::VKEY_8;
case '(':
*shifted = true;
FALLTHROUGH;
case '9':
return ui::VKEY_9;
case ':':
*shifted = true;
FALLTHROUGH;
case ';':
return ui::VKEY_OEM_1;
case '+':
*shifted = true;
FALLTHROUGH;
case '=':
return ui::VKEY_OEM_PLUS;
case '<':
*shifted = true;
FALLTHROUGH;
case ',':
return ui::VKEY_OEM_COMMA;
case '_':
*shifted = true;
FALLTHROUGH;
case '-':
return ui::VKEY_OEM_MINUS;
case '>':
*shifted = true;
FALLTHROUGH;
case '.':
return ui::VKEY_OEM_PERIOD;
case '?':
*shifted = true;
FALLTHROUGH;
case '/':
return ui::VKEY_OEM_2;
case '~':
*shifted = true;
FALLTHROUGH;
case '`':
return ui::VKEY_OEM_3;
case '{':
*shifted = true;
FALLTHROUGH;
case '[':
return ui::VKEY_OEM_4;
case '|':
*shifted = true;
FALLTHROUGH;
case '\\':
return ui::VKEY_OEM_5;
case '}':
*shifted = true;
FALLTHROUGH;
case ']':
return ui::VKEY_OEM_6;
case '"':
*shifted = true;
FALLTHROUGH;
case '\'':
return ui::VKEY_OEM_7;