From 3a26a0eaa76e5da6c27187dfe42d815276c58f94 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Mon, 28 Oct 2019 18:18:43 +0100 Subject: Fixed remote inspector for tool scripts Fixes #29506 --- core/ref_ptr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/ref_ptr.cpp') diff --git a/core/ref_ptr.cpp b/core/ref_ptr.cpp index 961f143e5c..6da73ca41a 100644 --- a/core/ref_ptr.cpp +++ b/core/ref_ptr.cpp @@ -49,6 +49,14 @@ bool RefPtr::operator==(const RefPtr &p_other) const { return *ref == *ref_other; } +bool RefPtr::operator!=(const RefPtr &p_other) const { + + Ref *ref = reinterpret_cast *>(&data[0]); + Ref *ref_other = reinterpret_cast *>(const_cast(&p_other.data[0])); + + return *ref != *ref_other; +} + RefPtr::RefPtr(const RefPtr &p_other) { memnew_placement(&data[0], Ref); -- cgit v1.2.3