From: <ps...@us...> - 2010-02-18 12:45:07
|
Revision: 1763 http://znc.svn.sourceforge.net/znc/?rev=1763&view=rev Author: psychon Date: 2010-02-18 12:44:52 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Make CSmartPtr::operator == const Yet Another cppcheck warning. Modified Paths: -------------- trunk/Utils.h Modified: trunk/Utils.h =================================================================== --- trunk/Utils.h 2010-02-18 12:42:49 UTC (rev 1762) +++ trunk/Utils.h 2010-02-18 12:44:52 UTC (rev 1763) @@ -413,8 +413,8 @@ // Overloaded operators T& operator *() const { assert(m_pType); return *m_pType; } T* operator ->() const { assert(m_pType); return m_pType; } - bool operator ==(T* rhs) { return (m_pType == rhs); } - bool operator ==(const CSmartPtr<T>& rhs) { return (m_pType == *rhs); } + bool operator ==(T* rhs) const { return (m_pType == rhs); } + bool operator ==(const CSmartPtr<T>& rhs) const { return (m_pType == *rhs); } /** * @brief Attach() to a raw pointer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |