diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2025-06-25 16:41:44 -0400 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2025-06-25 18:36:48 -0400 |
| commit | 0f7b68451787b64e7c99151d3631f6d57ee3a66b (patch) | |
| tree | ab7565164fa2d1f1b6f0bf26695d9c96660664fa /binaryninjaapi.h | |
| parent | 8da169d6d626fc3a8c307003e3c43516b16972ae (diff) | |
Fix Ref comparison operators
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 0002aa77..be4e6313 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -347,19 +347,19 @@ namespace BinaryNinja { bool operator!() const { return m_obj == nullptr; } - bool operator==(const T* obj) const { return T::GetObject(m_obj) == T::GetObject(obj); } + bool operator==(T* obj) const { return T::GetObject(m_obj) == T::GetObject(obj); } bool operator==(const Ref<T>& obj) const { return T::GetObject(m_obj) == T::GetObject(obj.m_obj); } - bool operator!=(const T* obj) const { return T::GetObject(m_obj) != T::GetObject(obj); } + bool operator!=(T* obj) const { return T::GetObject(m_obj) != T::GetObject(obj); } bool operator!=(const Ref<T>& obj) const { return T::GetObject(m_obj) != T::GetObject(obj.m_obj); } - bool operator<(const T* obj) const { return T::GetObject(m_obj) < T::GetObject(obj); } + bool operator<(T* obj) const { return T::GetObject(m_obj) < T::GetObject(obj); } bool operator<(const Ref<T>& obj) const { return T::GetObject(m_obj) < T::GetObject(obj.m_obj); } - bool operator>(const T* obj) const { return T::GetObject(m_obj) > T::GetObject(obj); } + bool operator>(T* obj) const { return T::GetObject(m_obj) > T::GetObject(obj); } bool operator>(const Ref<T>& obj) const { return T::GetObject(m_obj) > T::GetObject(obj.m_obj); } @@ -369,19 +369,19 @@ namespace BinaryNinja { template <class T> bool operator==(T* a, const Ref<T>& b) { - return a == b.GetPtr(); + return T::GetObject(a) == T::GetObject(b.GetPtr()); } template <class T> bool operator!=(T* a, const Ref<T>& b) { - return a != b.GetPtr(); + return T::GetObject(a) != T::GetObject(b.GetPtr()); } template <class T> bool operator<(T* a, const Ref<T>& b) { - return a < b.GetPtr(); + return T::GetObject(a) < T::GetObject(b.GetPtr()); } /*! @@ -398,11 +398,11 @@ namespace BinaryNinja { operator T*() const { return m_obj; } T* operator->() const { return m_obj; } T& operator*() const { return *m_obj; } - bool operator==(const T* obj) const { return T::GetObject(m_obj) == T::GetObject(obj); } + bool operator==(T* obj) const { return T::GetObject(m_obj) == T::GetObject(obj); } bool operator==(const Ref<T>& obj) const { return T::GetObject(m_obj) == T::GetObject(obj.m_obj); } - bool operator!=(const T* obj) const { return T::GetObject(m_obj) != T::GetObject(obj); } + bool operator!=(T* obj) const { return T::GetObject(m_obj) != T::GetObject(obj); } bool operator!=(const Ref<T>& obj) const { return T::GetObject(m_obj) != T::GetObject(obj.m_obj); } - bool operator<(const T* obj) const { return T::GetObject(m_obj) < T::GetObject(obj); } + bool operator<(T* obj) const { return T::GetObject(m_obj) < T::GetObject(obj); } bool operator<(const Ref<T>& obj) const { return T::GetObject(m_obj) < T::GetObject(obj.m_obj); } T* GetPtr() const { return m_obj; } }; @@ -410,19 +410,19 @@ namespace BinaryNinja { template <class T> bool operator==(T* a, const CallbackRef<T>& b) { - return a == b.GetPtr(); + return T::GetObject(a) == T::GetObjcet(b.GetPtr()); } template <class T> bool operator!=(T* a, const CallbackRef<T>& b) { - return a != b.GetPtr(); + return T::GetObject(a) != T::GetObject(b.GetPtr()); } template <class T> bool operator<(T* a, const CallbackRef<T>& b) { - return a < b.GetPtr(); + return T::GetObject(a) < T::GetObject(b.GetPtr()); } /*! |
