X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingFieldDouble.cxx;h=03d44c8d0cc452cfd9266bb0f6c6235ef5592a4a;hb=29f721b8ca46ed5d7872a8a23dd891c46d74ba10;hp=f2fb7e1bda84e3c35bcf7b6a0e68bdce61ecf409;hpb=887d0e1efce4f46f68d2596dcd801f02f5c1f99e;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index f2fb7e1bd..03d44c8d0 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -176,13 +176,13 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildNewTimeReprFromThis(TypeOfT /*! * Copy tiny info (component names, name, description) but warning the underlying mesh is not renamed (for safety reason). */ -void MEDCouplingFieldDouble::copyTinyStringsFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception) +void MEDCouplingFieldDouble::copyTinyStringsFrom(const MEDCouplingField *other) throw(INTERP_KERNEL::Exception) { - if(other) + MEDCouplingField::copyTinyStringsFrom(other); + const MEDCouplingFieldDouble *otherC=dynamic_cast(other); + if(otherC) { - setName(other->_name.c_str()); - setDescription(other->_desc.c_str()); - _time_discr->copyTinyStringsFrom(*other->_time_discr); + _time_discr->copyTinyStringsFrom(*otherC->_time_discr); } } @@ -196,6 +196,13 @@ void MEDCouplingFieldDouble::copyTinyAttrFrom(const MEDCouplingFieldDouble *othe { _time_discr->copyTinyAttrFrom(*other->_time_discr); } + +} + +void MEDCouplingFieldDouble::copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception) +{ + copyTinyStringsFrom(other); + copyTinyAttrFrom(other); } std::string MEDCouplingFieldDouble::simpleRepr() const