Tests/Docs after "stricter explicit conversion from Literals to Integers"

This commit is contained in:
hrkrshnn
2020-11-03 14:31:44 +01:00
parent a555556559
commit 29e23efc93
27 changed files with 90 additions and 76 deletions
@@ -15,7 +15,7 @@ contract BinarySearch {
uint256 _value
) private returns (uint256 o_position) {
if (_len == 0 || (_len == 1 && _data[_begin] != _value))
return uint256(-1); // failure
return type(uint256).max; // failure
uint256 halfLen = _len / 2;
uint256 v = _data[_begin + halfLen];
if (_value < v) return find(_data, _begin, halfLen, _value);