Browse Source

Anonymous id fix

Brian Fiete 8 months ago
parent
commit
613f9c743a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      IDEHelper/Compiler/BfReducer.cpp

+ 2 - 3
IDEHelper/Compiler/BfReducer.cpp

@@ -8229,9 +8229,8 @@ BfScopedInvocationTarget* BfReducer::CreateScopedInvocationTarget(BfAstNode*& ta
 
 void BfReducer::InitAnonymousType(BfTypeDeclaration* typeDecl)
 {
-	auto block = BfNodeDynCast<BfBlock>(typeDecl->mDefineNode);
-	int blockId = 0;
-	if (blockId != NULL)
+	int blockId = 0;	
+	if (auto block = BfNodeDynCast<BfBlock>(typeDecl->mDefineNode))
 	{
 		blockId = block->mParserBlockId;
 	}