aboutsummaryrefslogtreecommitdiff
path: root/src/stable/sharedcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/sharedcore.h')
-rw-r--r--src/stable/sharedcore.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/stable/sharedcore.h b/src/stable/sharedcore.h
index 90765fc..4e1fcc8 100644
--- a/src/stable/sharedcore.h
+++ b/src/stable/sharedcore.h
@@ -89,9 +89,6 @@ namespace Bu
89 89
90 SharedCore &operator=( const SharedCore &rhs ) 90 SharedCore &operator=( const SharedCore &rhs )
91 { 91 {
92 if( core == rhs.core )
93 return *this;
94
95 _softCopy( rhs ); 92 _softCopy( rhs );
96 return *this; 93 return *this;
97 } 94 }
@@ -161,6 +158,18 @@ namespace Bu
161 delete pSrc; 158 delete pSrc;
162 } 159 }
163 160
161 void _softCopy( const _SharedType &rSrc )
162 {
163 if( core == rSrc.core )
164 return;
165
166 if( core )
167 _deref();
168 core = rSrc.core;
169 iRefCount = rSrc.iRefCount;
170 _incRefCount();
171 }
172
164 private: 173 private:
165 void _deref() 174 void _deref()
166 { 175 {
@@ -179,15 +188,6 @@ namespace Bu
179 ++(*iRefCount); 188 ++(*iRefCount);
180 } 189 }
181 190
182 void _softCopy( const _SharedType &rSrc )
183 {
184 if( core )
185 _deref();
186 core = rSrc.core;
187 iRefCount = rSrc.iRefCount;
188 _incRefCount();
189 }
190
191 int *iRefCount; 191 int *iRefCount;
192 }; 192 };
193}; 193};