mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add fast path for NavPoint equality.
Hot method and the FFI costs for comparing the points are not cheap.
This commit is contained in:
parent
9a374711fd
commit
67a9df686e
@ -50,6 +50,9 @@ class NavPoint:
|
|||||||
return hash(self.poly.ident)
|
return hash(self.poly.ident)
|
||||||
|
|
||||||
def __eq__(self, other: object) -> bool:
|
def __eq__(self, other: object) -> bool:
|
||||||
|
if id(self) == id(other):
|
||||||
|
return True
|
||||||
|
|
||||||
if not isinstance(other, NavPoint):
|
if not isinstance(other, NavPoint):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user