From 797321fec45df71f1f7d4fcca4e9af30d11853b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 17 Mar 2022 11:03:03 +0100 Subject: [PATCH] RID: Change comparison operators to use RID_Data id instead of address This should helps making sorting more deterministic in physics and rendering. The same change was done for 4.0 in 4f163972bbd9c7379b01a1f9aa5310646ca7865e. --- core/rid.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/rid.h b/core/rid.h index 751b8d5ae67..242a56a8dd5 100644 --- a/core/rid.h +++ b/core/rid.h @@ -68,13 +68,13 @@ public: return _data == p_rid._data; } _FORCE_INLINE_ bool operator<(const RID &p_rid) const { - return _data < p_rid._data; + return get_id() < p_rid.get_id(); } _FORCE_INLINE_ bool operator<=(const RID &p_rid) const { - return _data <= p_rid._data; + return get_id() <= p_rid.get_id(); } _FORCE_INLINE_ bool operator>(const RID &p_rid) const { - return _data > p_rid._data; + return get_id() > p_rid.get_id(); } _FORCE_INLINE_ bool operator!=(const RID &p_rid) const { return _data != p_rid._data;