mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 04:15:14 -04:00
SingleWorldMesh: also compare for equals
Fixes Comparison method violates its general contract! errors
This commit is contained in:
parent
be23b57cdc
commit
cca78d24a5
@ -45,10 +45,9 @@ class SingleWorldMesh(context: RenderContext, initialCacheSize: Int, onDemand: B
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun compareTo(other: SingleWorldMesh): Int {
|
override fun compareTo(other: SingleWorldMesh): Int {
|
||||||
if (distance < other.distance) {
|
if (distance < other.distance) return -1
|
||||||
return -1
|
if (distance > other.distance) return 1
|
||||||
}
|
return 0
|
||||||
return 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data class WorldMeshStruct(
|
data class WorldMeshStruct(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user