summaryrefslogtreecommitdiff
path: root/include/m_system_cpp.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-24 22:03:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-24 22:03:42 +0000
commit843145196e0aa520ba23b6f6cffc393118bcf46a (patch)
tree1cde05c2b384dbcf257824e24559c1a152ee74c3 /include/m_system_cpp.h
parent738bc36a24eb631c02edd0577656bebb1396a6e1 (diff)
fix for mir_ptr<T> assignment
git-svn-id: http://svn.miranda-ng.org/main/trunk@619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_system_cpp.h')
-rw-r--r--include/m_system_cpp.h1
1 files changed, 1 insertions, 0 deletions
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 T> 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; }
};