diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/csptr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/stc/csptr.h b/include/stc/csptr.h index 58392bb1..f8b02c0b 100644 --- a/include/stc/csptr.h +++ b/include/stc/csptr.h @@ -163,7 +163,8 @@ cx_memb(_copy)(Self* self, Self ptr) { STC_INLINE void
cx_memb(_take)(Self* self, Self ptr) {
- cx_memb(_del)(self); *self = ptr;
+ if (self->get != ptr.get) cx_memb(_del)(self);
+ *self = ptr;
}
STC_INLINE int
|
