Add 'available since' notices
This commit is contained in:
@ -117,6 +117,8 @@ library SafeCast {
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 128 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt128(int256 value) internal pure returns (int128) {
|
||||
require(value >= -2**127 && value < 2**127, "SafeCast: value doesn\'t fit in 128 bits");
|
||||
@ -133,6 +135,8 @@ library SafeCast {
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 64 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt64(int256 value) internal pure returns (int64) {
|
||||
require(value >= -2**63 && value < 2**63, "SafeCast: value doesn\'t fit in 64 bits");
|
||||
@ -149,6 +153,8 @@ library SafeCast {
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 32 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt32(int256 value) internal pure returns (int32) {
|
||||
require(value >= -2**31 && value < 2**31, "SafeCast: value doesn\'t fit in 32 bits");
|
||||
@ -165,6 +171,8 @@ library SafeCast {
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 16 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt16(int256 value) internal pure returns (int16) {
|
||||
require(value >= -2**15 && value < 2**15, "SafeCast: value doesn\'t fit in 16 bits");
|
||||
@ -181,6 +189,8 @@ library SafeCast {
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 8 bits.
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt8(int256 value) internal pure returns (int8) {
|
||||
require(value >= -2**7 && value < 2**7, "SafeCast: value doesn\'t fit in 8 bits");
|
||||
|
||||
Reference in New Issue
Block a user