Remove code in preparation for v5.0 (#4258)
Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -140,22 +140,6 @@ library EnumerableMap {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when `key` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(
|
||||
Bytes32ToBytes32Map storage map,
|
||||
bytes32 key,
|
||||
string memory errorMessage
|
||||
) internal view returns (bytes32) {
|
||||
bytes32 value = map._values[key];
|
||||
require(value != 0 || contains(map, key), errorMessage);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
@ -242,16 +226,6 @@ library EnumerableMap {
|
||||
return uint256(get(map._inner, bytes32(key)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when `key` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) {
|
||||
return uint256(get(map._inner, bytes32(key), errorMessage));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
@ -346,20 +320,6 @@ library EnumerableMap {
|
||||
return address(uint160(uint256(get(map._inner, bytes32(key)))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when `key` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(
|
||||
UintToAddressMap storage map,
|
||||
uint256 key,
|
||||
string memory errorMessage
|
||||
) internal view returns (address) {
|
||||
return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
@ -454,20 +414,6 @@ library EnumerableMap {
|
||||
return uint256(get(map._inner, bytes32(uint256(uint160(key)))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when `key` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(
|
||||
AddressToUintMap storage map,
|
||||
address key,
|
||||
string memory errorMessage
|
||||
) internal view returns (uint256) {
|
||||
return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
@ -562,20 +508,6 @@ library EnumerableMap {
|
||||
return uint256(get(map._inner, key));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when `key` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(
|
||||
Bytes32ToUintMap storage map,
|
||||
bytes32 key,
|
||||
string memory errorMessage
|
||||
) internal view returns (uint256) {
|
||||
return uint256(get(map._inner, key, errorMessage));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user