Skip to content

Commit 9d171ed

Browse files
style nits
1 parent 6f8a4e2 commit 9d171ed

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

tools/clang/unittests/HLSLExec/CoopVec.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ struct LinAlgHeaderIncludeHandler : public IDxcIncludeHandler {
3434
L"LinAlgHeader", ParamValue))) {
3535
return E_FAIL;
3636
}
37-
if (ParamValue.IsEmpty()) {
37+
38+
if (ParamValue.IsEmpty())
3839
return E_FAIL;
39-
}
40+
4041
LPCWSTR RealHeaderPath =
4142
reinterpret_cast<LPCWSTR>(ParamValue.GetBuffer());
4243

@@ -382,15 +383,12 @@ struct TestVector {
382383
size_t Alignment = 16)
383384
: NumVectors(NumVectors), VectorSize(VectorSize),
384385
ElementSize(ElementSize) {
385-
if (NumVectors == 0) {
386+
if (NumVectors == 0)
386387
throw std::invalid_argument("NumVectors must be greater than 0");
387-
}
388-
if (VectorSize == 0) {
388+
if (VectorSize == 0)
389389
throw std::invalid_argument("VectorSize must be greater than 0");
390-
}
391-
if (ElementSize == 0) {
390+
if (ElementSize == 0)
392391
throw std::invalid_argument("ElementSize must be greater than 0");
393-
}
394392

395393
size_t VectorBytes = VectorSize * ElementSize;
396394
Stride = ((VectorBytes + Alignment - 1) / Alignment) * Alignment;
@@ -488,9 +486,8 @@ struct TestVector {
488486
Buffer = reinterpret_cast<uint8_t *>(Ptr);
489487

490488
// Copy data
491-
if (other.Buffer) {
489+
if (other.Buffer)
492490
std::memcpy(Buffer, other.Buffer, TotalBytes);
493-
}
494491
}
495492
return *this;
496493
}

0 commit comments

Comments
 (0)