Make MIN_VALUE and MAX_VALUE of unsigned types actual constants

This commit is contained in:
Ilya Gorbunov
2018-06-29 19:54:46 +03:00
parent 7a208c3e01
commit 3349976279
5 changed files with 10 additions and 10 deletions
@@ -17,12 +17,12 @@ public inline class UByte internal constructor(private val data: Byte) : Compara
/**
* A constant holding the minimum value an instance of UByte can have.
*/
public /*const*/ val MIN_VALUE: UByte = UByte(0)
public const val MIN_VALUE: UByte = UByte(0)
/**
* A constant holding the maximum value an instance of UByte can have.
*/
public /*const*/ val MAX_VALUE: UByte = UByte(-1)
public const val MAX_VALUE: UByte = UByte(-1)
}
/**
+2 -2
View File
@@ -17,12 +17,12 @@ public inline class UInt internal constructor(private val data: Int) : Comparabl
/**
* A constant holding the minimum value an instance of UInt can have.
*/
public /*const*/ val MIN_VALUE: UInt = UInt(0)
public const val MIN_VALUE: UInt = UInt(0)
/**
* A constant holding the maximum value an instance of UInt can have.
*/
public /*const*/ val MAX_VALUE: UInt = UInt(-1)
public const val MAX_VALUE: UInt = UInt(-1)
}
/**
@@ -17,12 +17,12 @@ public inline class ULong internal constructor(private val data: Long) : Compara
/**
* A constant holding the minimum value an instance of ULong can have.
*/
public /*const*/ val MIN_VALUE: ULong = ULong(0)
public const val MIN_VALUE: ULong = ULong(0)
/**
* A constant holding the maximum value an instance of ULong can have.
*/
public /*const*/ val MAX_VALUE: ULong = ULong(-1)
public const val MAX_VALUE: ULong = ULong(-1)
}
/**
@@ -17,12 +17,12 @@ public inline class UShort internal constructor(private val data: Short) : Compa
/**
* A constant holding the minimum value an instance of UShort can have.
*/
public /*const*/ val MIN_VALUE: UShort = UShort(0)
public const val MIN_VALUE: UShort = UShort(0)
/**
* A constant holding the maximum value an instance of UShort can have.
*/
public /*const*/ val MAX_VALUE: UShort = UShort(-1)
public const val MAX_VALUE: UShort = UShort(-1)
}
/**