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
|
|
@ -6260,7 +6260,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
error(loc, "needs a literal integer", "max_primitives", "");
|
||||
return;
|
||||
}
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
|
||||
case EShLangTask:
|
||||
// Fall through
|
||||
|
|
@ -8609,7 +8609,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||
TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUint64, true, node, type);
|
||||
return newNode;
|
||||
}
|
||||
// fall through
|
||||
[[fallthrough]];
|
||||
case EOpConstructU64Vec2:
|
||||
case EOpConstructU64Vec3:
|
||||
case EOpConstructU64Vec4:
|
||||
|
|
@ -9674,7 +9674,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
|
||||
break;
|
||||
}
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
case ElgPoints:
|
||||
case ElgLineStrip:
|
||||
case ElgTriangleStrip:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue