Use [[fallthrough]] attribute instead of comments.
Now that we require C++17, the [[fallthrough]] attribute is available as an alternative to load-bearing comments.
This commit is contained in:
parent
8ca24e7cf1
commit
606209e07d
9 changed files with 22 additions and 21 deletions
|
|
@ -360,7 +360,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||
switch (stream[word]) {
|
||||
case 8: idDescriptor[resultId] = "int8_t"; break;
|
||||
case 16: idDescriptor[resultId] = "int16_t"; break;
|
||||
default: assert(0); // fallthrough
|
||||
default: assert(0); [[fallthrough]];
|
||||
case 32: idDescriptor[resultId] = "int"; break;
|
||||
case 64: idDescriptor[resultId] = "int64_t"; break;
|
||||
}
|
||||
|
|
@ -368,7 +368,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||
case OpTypeFloat:
|
||||
switch (stream[word]) {
|
||||
case 16: idDescriptor[resultId] = "float16_t"; break;
|
||||
default: assert(0); // fallthrough
|
||||
default: assert(0); [[fallthrough]];
|
||||
case 32: idDescriptor[resultId] = "float"; break;
|
||||
case 64: idDescriptor[resultId] = "float64_t"; break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue