Browse Source

Format: Silence compiler warning about switch statement fall through

master
Riyyi 2 years ago
parent
commit
145c7e44a2
  1. 8
      src/ruc/format/formatter.h

8
src/ruc/format/formatter.h

@ -108,9 +108,11 @@ struct Formatter<T> {
uint8_t base = 0; uint8_t base = 0;
bool uppercase = false; bool uppercase = false;
switch (specifier.type) { switch (specifier.type) {
case PresentationType::Binary:
base = 2;
break;
case PresentationType::BinaryUppercase: case PresentationType::BinaryUppercase:
uppercase = true; uppercase = true;
case PresentationType::Binary:
base = 2; base = 2;
break; break;
case PresentationType::Octal: case PresentationType::Octal:
@ -120,9 +122,11 @@ struct Formatter<T> {
case PresentationType::Decimal: case PresentationType::Decimal:
base = 10; base = 10;
break; break;
case PresentationType::Hex:
base = 16;
break;
case PresentationType::HexUppercase: case PresentationType::HexUppercase:
uppercase = true; uppercase = true;
case PresentationType::Hex:
base = 16; base = 16;
break; break;
default: default:

Loading…
Cancel
Save