mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests/Docs after "stricter explicit conversion from Literals to Integers"
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user