X-Git-Url: http://git.silmor.de/gitweb/?p=web%2Fkonrad%2Fchester.git;a=blobdiff_plain;f=dptr.h;fp=dptr.h;h=121aaa4ed5315137ed74874535c53c25b8024eb8;hp=c74ad22518683e6de3d226c2f9c8f5027d0a8c61;hb=5fbfaee0f9f5469f73125a7044d8d26a0724f645;hpb=948744964683dec959bb3f2a9a18903bf20b8cac diff --git a/dptr.h b/dptr.h index c74ad22..121aaa4 100644 --- a/dptr.h +++ b/dptr.h @@ -53,5 +53,5 @@ To be used in implementation where the actual d-pointer class is implemented. Class::DPrivate::~DPrivate(){delete d;}\ Class::DPrivate Class::DPrivate::clone()const{DPrivate r;*(r.d)=*d;return r;}\ Class::DPrivate& Class::DPrivate::operator=(const Class::DPrivate&dp)\ - {*d=*(dp.d);return *this;} + {if(d!=dp.d)*d=*(dp.d);return *this;}