diff --git a/src/storm/storage/expressions/Expression.cpp b/src/storm/storage/expressions/Expression.cpp index 0221628db..520bf1db4 100644 --- a/src/storm/storage/expressions/Expression.cpp +++ b/src/storm/storage/expressions/Expression.cpp @@ -133,9 +133,12 @@ namespace storm { bool Expression::containsVariable(std::set const& variables) const { std::set appearingVariables = this->getVariables(); - std::set intersection; - std::set_intersection(variables.begin(), variables.end(), appearingVariables.begin(), appearingVariables.end(), std::inserter(intersection, intersection.begin())); - return !intersection.empty(); + for (auto const& v : variables) { + if (appearingVariables.count(v) > 0) { + return true; + } + } + return false; } bool Expression::containsVariableInITEGuard(std::set const& variables) const {