Fix compiler warning.

This commit is contained in:
chriseth
2022-03-20 20:19:18 +01:00
parent 7a250fea42
commit e6c67924b0
+6 -3
View File
@@ -318,7 +318,8 @@ bool boundsToConstraints(SolvingState& _state)
return false;
if (*bounds.lower == *bounds.upper)
{
vector<rational> c(columns);
LinearExpression c;
c.resize(columns);
c[0] = *bounds.lower;
c[index] = bigint(1);
_state.constraints.emplace_back(Constraint{move(c), true});
@@ -327,14 +328,16 @@ bool boundsToConstraints(SolvingState& _state)
}
if (bounds.lower && *bounds.lower > 0)
{
vector<rational> c(columns);
LinearExpression c;
c.resize(columns);
c[0] = -*bounds.lower;
c[index] = bigint(-1);
_state.constraints.emplace_back(Constraint{move(c), false});
}
if (bounds.upper)
{
vector<rational> c(columns);
LinearExpression c;
c.resize(columns);
c[0] = *bounds.upper;
c[index] = bigint(1);
_state.constraints.emplace_back(Constraint{move(c), false});