[orx-panel] Fix watchHash for Kotlin 1.4
This commit is contained in:
@@ -7,7 +7,7 @@ import kotlin.reflect.full.declaredMemberProperties
|
|||||||
fun watchHash(toHash: Any): Int {
|
fun watchHash(toHash: Any): Int {
|
||||||
var hash = 0
|
var hash = 0
|
||||||
for (property in toHash::class.declaredMemberProperties) {
|
for (property in toHash::class.declaredMemberProperties) {
|
||||||
val v = ((property.getter) as KProperty1<Any, Any>).invoke(toHash)
|
val v = ((property as KProperty1<Any, Any?>).getter).invoke(toHash)
|
||||||
if (v is KProperty0<*>) {
|
if (v is KProperty0<*>) {
|
||||||
val pv = v.get()
|
val pv = v.get()
|
||||||
hash = 31 * hash + (pv?.hashCode() ?: 0)
|
hash = 31 * hash + (pv?.hashCode() ?: 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user