mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
SMTSolverChoice: Rewrite operator & not to modify its argument
This commit is contained in:
parent
588ec39eef
commit
b3a513d3b6
@ -65,7 +65,7 @@ struct SMTSolverChoice
|
|||||||
return solvers;
|
return solvers;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMTSolverChoice& operator&(SMTSolverChoice const& _other)
|
SMTSolverChoice& operator&=(SMTSolverChoice const& _other)
|
||||||
{
|
{
|
||||||
cvc4 &= _other.cvc4;
|
cvc4 &= _other.cvc4;
|
||||||
smtlib2 &= _other.smtlib2;
|
smtlib2 &= _other.smtlib2;
|
||||||
@ -73,9 +73,10 @@ struct SMTSolverChoice
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMTSolverChoice& operator&=(SMTSolverChoice const& _other)
|
SMTSolverChoice operator&(SMTSolverChoice _other) const noexcept
|
||||||
{
|
{
|
||||||
return *this & _other;
|
_other &= *this;
|
||||||
|
return _other;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(SMTSolverChoice const& _other) const noexcept { return !(*this == _other); }
|
bool operator!=(SMTSolverChoice const& _other) const noexcept { return !(*this == _other); }
|
||||||
|
Loading…
Reference in New Issue
Block a user