Skip to content

Commit 3d69171

Browse files
authored
Shorten bool conversion, remove unneeded change (microsoft#7197)
Polishing up changes made to improve dxc buildability in different environments.
1 parent a2979e7 commit 3d69171

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/DxilValidation/DxilContainerValidation.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,9 @@ void PSVContentVerifier::VerifySignatureElement(
337337

338338
PSVSignatureElement PSVSE(StrTab, IndexTab, PSVSE0);
339339
if (SE.IsArbitrary())
340-
Mismatch |=
341-
strcmp(PSVSE.GetSemanticName(), SE.GetName()) == 0 ? false : true;
340+
Mismatch |= strcmp(PSVSE.GetSemanticName(), SE.GetName()) != 0;
342341
else
343-
Mismatch |= PSVSE0->SemanticKind != static_cast<uint8_t>(SE.GetKind()) == 0
344-
? false
345-
: true;
342+
Mismatch |= PSVSE0->SemanticKind != static_cast<uint8_t>(SE.GetKind());
346343

347344
ModulePSVSE0.SemanticName = PSVSE0->SemanticName;
348345
// Compare all fields.
@@ -497,7 +494,7 @@ void PSVContentVerifier::Verify(unsigned ValMajor, unsigned ValMinor,
497494
std::to_string(ShaderStage));
498495
return;
499496
}
500-
bool ViewIDUsed = PSV1->UsesViewID == 0 ? false : true;
497+
bool ViewIDUsed = PSV1->UsesViewID != 0;
501498
if (ViewIDUsed != DM.m_ShaderFlags.GetViewID())
502499
EmitMismatchError("UsesViewID", std::to_string(PSV1->UsesViewID),
503500
std::to_string(DM.m_ShaderFlags.GetViewID()));

0 commit comments

Comments
 (0)