diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-10-28 18:18:43 +0100 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-10-28 18:32:00 +0100 |
commit | 3a26a0eaa76e5da6c27187dfe42d815276c58f94 (patch) | |
tree | d1581f5d7895d09a006c71a19ac932c2e6de5dd8 /core/ref_ptr.cpp | |
parent | 7d710a745e3eecbde482349fff78f0a4e14f6371 (diff) | |
download | redot-engine-3a26a0eaa76e5da6c27187dfe42d815276c58f94.tar.gz |
Fixed remote inspector for tool scripts
Fixes #29506
Diffstat (limited to 'core/ref_ptr.cpp')
-rw-r--r-- | core/ref_ptr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]); + Ref<Reference> *ref_other = reinterpret_cast<Ref<Reference> *>(const_cast<char *>(&p_other.data[0])); + + return *ref != *ref_other; +} + RefPtr::RefPtr(const RefPtr &p_other) { memnew_placement(&data[0], Ref<Reference>); |