Skip to content

Commit

Permalink
remove unnecessary lines
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhangNV committed Jan 17, 2025
1 parent f677273 commit 2f3c992
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/slang.h
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ typedef uint32_t SlangSizeT;
Language,
MatrixLayoutColumn, // bool
MatrixLayoutRow, // bool
ZeroInitialize, // bool
ZeroInitialize, // bool
IgnoreCapabilities, // bool
RestrictiveCapabilityCheck, // bool
ModuleName, // stringValue0: module name.
Expand Down
9 changes: 3 additions & 6 deletions source/slang/slang-check-conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,10 @@ bool SemanticsVisitor::isCStyleStruct(StructDecl* structDecl)
auto* elementType = arrayType->getElementType();
for (;;)
{
ArrayExpressionType* nextType = as<ArrayExpressionType>(elementType);
if (!nextType)
if (auto nextType = as<ArrayExpressionType>(elementType))
elementType = nextType->getElementType();
else
break;

elementType = nextType->getElementType();
}

if (auto elemStructDecl = _getStructDecl(elementType))
Expand Down Expand Up @@ -864,9 +863,7 @@ bool SemanticsVisitor::_coerceInitializerList(
outToExpr,
fromInitializerListExpr,
argIndex))
{
return false;
}

if (argIndex != argCount)
{
Expand Down

0 comments on commit 2f3c992

Please sign in to comment.