mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
319 B
12 lines
319 B
4 years ago
|
/// @dev returns the smaller of the two values.
|
||
|
function min(uint x, uint y) pure returns (uint) {
|
||
|
return x < y ? x : y;
|
||
|
}
|
||
|
|
||
|
/// @dev returns the sum of the elements of the storage array
|
||
|
function sum(uint[] storage items) view returns (uint s) {
|
||
|
for (uint i = 0; i < items.length; i++)
|
||
|
s += items[i];
|
||
|
}
|
||
|
|