From: ageay Date: Fri, 28 Jun 2013 08:21:34 +0000 (+0000) Subject: Debug revealed with convertTo X-Git-Tag: B4CMakeModifs~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fabe2f209416d2fdfae9bc18b65f9166255df2ce;p=modules%2Fmed.git Debug revealed with convertTo --- diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.cxx b/src/MEDCoupling/MEDCouplingRefCountObject.cxx index c8de20ea9..443ae2cd8 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.cxx +++ b/src/MEDCoupling/MEDCouplingRefCountObject.cxx @@ -54,6 +54,15 @@ RefCountObject::RefCountObject(const RefCountObject& other):_cnt(1) { } +/*! + * Do nothing here ! It is not a bug ( I hope :) ) because all subclasses that + * copies using operator= should not copy the ref counter of \a other ! + */ +RefCountObject& RefCountObject::operator=(const RefCountObject& other) +{ + return *this; +} + bool RefCountObject::decrRef() const { bool ret=((--_cnt)==0); diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.hxx b/src/MEDCoupling/MEDCouplingRefCountObject.hxx index 0eb1f4dea..c52e0aff0 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.hxx +++ b/src/MEDCoupling/MEDCouplingRefCountObject.hxx @@ -67,6 +67,7 @@ namespace ParaMEDMEM void incrRef() const; virtual std::size_t getHeapMemorySize() const = 0; int getRCValue() const; + RefCountObject& operator=(const RefCountObject& other); protected: virtual ~RefCountObject(); private: