Merge tag 'v2.2.0' of github.com:OpenZeppelin/openzeppelin-solidity
v2.2.0
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.5.0;
|
||||
pragma solidity ^0.5.2;
|
||||
|
||||
/**
|
||||
* Utility library of inline functions on addresses
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.5.0;
|
||||
pragma solidity ^0.5.2;
|
||||
|
||||
import "../math/Math.sol";
|
||||
|
||||
@ -9,13 +9,13 @@ import "../math/Math.sol";
|
||||
*/
|
||||
library Arrays {
|
||||
/**
|
||||
* @dev Upper bound search function which is kind of binary search algoritm. It searches sorted
|
||||
* array to find index of the element value. If element is found then returns it's index otherwise
|
||||
* it returns index of first element which is grater than searched value. If searched element is
|
||||
* @dev Upper bound search function which is kind of binary search algorithm. It searches sorted
|
||||
* array to find index of the element value. If element is found then returns its index otherwise
|
||||
* it returns index of first element which is greater than searched value. If searched element is
|
||||
* bigger than any array element function then returns first index after last element (i.e. all
|
||||
* values inside the array are smaller than the target). Complexity O(log n).
|
||||
* @param array The array sorted in ascending order.
|
||||
* @param element The element's value to be find.
|
||||
* @param element The element's value to be found.
|
||||
* @return The calculated index value. Returns 0 for empty array.
|
||||
*/
|
||||
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.5.0;
|
||||
pragma solidity ^0.5.2;
|
||||
|
||||
import "zos-lib/contracts/Initializable.sol";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user