mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
small optimization.
This commit is contained in:
parent
5faebbff39
commit
db9028906a
@ -514,12 +514,9 @@ bool Constraint::operator<(Constraint const& _other) const
|
||||
return equality < _other.equality;
|
||||
|
||||
for (size_t i = 0; i < max(data.size(), _other.data.size()); ++i)
|
||||
{
|
||||
rational const& a = data.get(i);
|
||||
rational const& b = _other.data.get(i);
|
||||
if (a != b)
|
||||
return a < b;
|
||||
}
|
||||
if (rational diff = data.get(i) - _other.data.get(i))
|
||||
return diff < 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user