mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Made for (var i < GetVal())
only call GetVal()
once
This commit is contained in:
parent
70da0856a7
commit
e3bdacf505
2 changed files with 15 additions and 2 deletions
|
@ -5845,8 +5845,6 @@ void BfModule::DoForLess(BfForEachStatement* forEachStmt)
|
|||
// Cond
|
||||
auto valueScopeStart = ValueScopeStart();
|
||||
auto localVal = mBfIRBuilder->CreateLoad(localDef->mAddr);
|
||||
if ((forEachStmt->mCollectionExpression != NULL) && (!didInference))
|
||||
target = CreateValueFromExpression(forEachStmt->mCollectionExpression, varType);
|
||||
if (!target)
|
||||
{
|
||||
// Soldier on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue