summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/osmart_pointer.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/osmart_pointer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/osmart_pointer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/osmart_pointer.h b/libopie2/opiecore/osmart_pointer.h
index a362a60..2a2518f 100644
--- a/libopie2/opiecore/osmart_pointer.h
+++ b/libopie2/opiecore/osmart_pointer.h
@@ -88,16 +88,16 @@ public:
88 delete ptr; 88 delete ptr;
89 } 89 }
90 } 90 }
91 //! construction 91 //! construction
92 osmart_pointer(T* t) { if (ptr = t) ptr->Incr(); } 92 osmart_pointer(T* t) { if (ptr = t) ptr->Incr(); }
93 //! Pointer copy 93 //! Pointer copy
94 osmart_pointer(const smart_pointer<T>& p) 94 osmart_pointer(const osmart_pointer<T>& p)
95 { if (ptr = p.ptr) ptr->Incr(); } 95 { if (ptr = p.ptr) ptr->Incr(); }
96 //! pointer copy by assignment 96 //! pointer copy by assignment
97 osmart_pointer<T>& operator= (const smart_pointer<T>& p) 97 osmart_pointer<T>& operator= (const osmart_pointer<T>& p)
98 { 98 {
99 // already same: nothing to do 99 // already same: nothing to do
100 if (ptr == p.ptr) return *this; 100 if (ptr == p.ptr) return *this;
101 // decouple reference 101 // decouple reference
102 if (ptr) { ptr->Decr(); if (!ptr->Shared()) delete ptr; } 102 if (ptr) { ptr->Decr(); if (!ptr->Shared()) delete ptr; }
103 // establish new reference 103 // establish new reference