From 16fd1ed48e83fba5a897300c83fd74067a6e3723 Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 24 Apr 2020 22:20:26 -0400 Subject: [PATCH] shared pointer comparisons with other pointers Former-commit-id: d5ede50b040c82e02eb2b82982091bdd0fb7da12 --- src/server.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server.h b/src/server.h index 8870a6a07..a7a1e2adc 100644 --- a/src/server.h +++ b/src/server.h @@ -210,11 +210,21 @@ public: return m_ptr == other.m_ptr; } + bool operator==(const void *p) const + { + return m_ptr == p; + } + bool operator!=(const robj_sharedptr &other) const { return m_ptr != other.m_ptr; } + bool operator!=(const void *p) const + { + return m_ptr != p; + } + redisObject* operator->() const { return m_ptr;