summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-autodiff-loop-analysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-autodiff-loop-analysis.cpp')
-rw-r--r--source/slang/slang-ir-autodiff-loop-analysis.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/slang/slang-ir-autodiff-loop-analysis.cpp b/source/slang/slang-ir-autodiff-loop-analysis.cpp
index d4ff631a6..137ab7775 100644
--- a/source/slang/slang-ir-autodiff-loop-analysis.cpp
+++ b/source/slang/slang-ir-autodiff-loop-analysis.cpp
@@ -252,11 +252,8 @@ void StatementSet::disjunct(StatementSet other)
// Remove any insts that don't have a corresponding statement in the other set,
// since this effectively means "any".
//
- for (auto& statement : statements)
- {
- if (!other.statements.containsKey(statement.first))
- statements.remove(statement.first);
- }
+ statements.removeIf([&](auto const& statement)
+ { return !other.statements.containsKey(statement.first); });
}
void StatementSet::conjunct(StatementSet other)