From 843145196e0aa520ba23b6f6cffc393118bcf46a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Jun 2012 22:03:42 +0000 Subject: fix for mir_ptr assignment git-svn-id: http://svn.miranda-ng.org/main/trunk@619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_system_cpp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/m_system_cpp.h') diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index 9d872480e9..c0e448fec3 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -45,6 +45,7 @@ template class mir_ptr public: __inline mir_ptr(T* _p) : data(_p) {} __inline ~mir_ptr() { mir_free(data); } + __inline T* operator= (T* _p) { if (data) mir_free(data); data = _p; return data; } __inline operator T*() const { return data; } __inline operator INT_PTR() const { return (INT_PTR)data; } }; -- cgit v1.2.3