summaryrefslogtreecommitdiff
path: root/impl/Expression.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Expression.hpp')
-rw-r--r--impl/Expression.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/impl/Expression.hpp b/impl/Expression.hpp
index 00bc9cd..0f3717f 100644
--- a/impl/Expression.hpp
+++ b/impl/Expression.hpp
@@ -143,7 +143,7 @@ struct OperatorExpression : public Expression<Domain> {
template<typename Domain>
struct MaxExpression : public OperatorExpression<Domain> {
MaxExpression(const unsigned int& id, const Maximum<Domain>& op, const std::vector<Expression<Domain>*>& arguments)
- : OperatorExpression<Domain>(op, arguments), _id(id) { }
+ : OperatorExpression<Domain>(op, arguments), _id(id) {}
const MaxExpression* toMaxExpression() const {
return this;
@@ -161,9 +161,11 @@ struct MaxExpression : public OperatorExpression<Domain> {
i < length;
++i) {
const Domain value = this->_arguments[i]->eval(rho, strat);
- if (bestValue < value) {
- bestValue = value;
- bestIndex = i;
+ if (!value.isUnknown()) {
+ if (bestValue < value) {
+ bestValue = value;
+ bestIndex = i;
+ }
}
}
return bestIndex;