mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 12:25:12 -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 {
|
||||
if (distance < other.distance) {
|
||||
return -1
|
||||
}
|
||||
return 1
|
||||
if (distance < other.distance) return -1
|
||||
if (distance > other.distance) return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
data class WorldMeshStruct(
|
||||
|
Loading…
x
Reference in New Issue
Block a user