add ignore pattern for git
[web/konrad/chester.git] / dptr_shared.h
index 7e73853..88dc7a4 100644 (file)
@@ -9,8 +9,8 @@
 #include "dptr_base.h"
 
 
-#ifndef DPTR_SHAREDCLASS_H
-#define DPTR_SHAREDCLASS_H
+#ifndef DPTR_SHAREDCLASS_0_1_H
+#define DPTR_SHAREDCLASS_0_1_H
 //hide the namespace
 /// \cond never
 namespace Chester_0_1{
@@ -58,5 +58,5 @@ To be used in implementation where the actual d-pointer class is implemented.
  Class::DPrivate::~DPrivate(){d->detach();}\
  Class::DPrivate Class::DPrivate::clone()const{DPrivate r;*(r.d)=*d;return r;}\
  Class::DPrivate& Class::DPrivate::operator=(const DPrivate&dp)\
- {d->detach();d=dp.d;d->attach();return *this;}
+ {if(d!=dp.d){d->detach();d=dp.d;d->attach();}return *this;}