Salome HOME
Merge from MrgToV7main1804
[modules/med.git] / src / MEDCoupling / MEDCouplingMultiFields.cxx
index d261867686ec8fbb85741bc74a69fe90e443b66c..963eed05c026b12b649e81f4e1c7d529aa48a373 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -342,8 +342,8 @@ MEDCouplingMultiFields::MEDCouplingMultiFields(const MEDCouplingMultiFields& oth
     {
       if((const MEDCouplingFieldDouble *)other._fs[i])
         {
-          MEDCouplingFieldTemplate *tmp=MEDCouplingFieldTemplate::New(other._fs[i]);
-          _fs[i]=MEDCouplingFieldDouble::New(tmp,other._fs[i]->getTimeDiscretization());
+          MEDCouplingFieldTemplate *tmp=MEDCouplingFieldTemplate::New(*other._fs[i]);
+          _fs[i]=MEDCouplingFieldDouble::New(*tmp,other._fs[i]->getTimeDiscretization());
           tmp->decrRef();
           if(refs[i]!=-1)
             _fs[i]->setMesh(ms2[refs[i]]);
@@ -437,7 +437,7 @@ void MEDCouplingMultiFields::finishUnserialization(const std::vector<int>& tinyI
   int offD=0;
   for(int i=0;i<sz;i++)
     {
-      _fs[i]=MEDCouplingFieldDouble::New(ft[i],(TypeOfTimeDiscretization)tinyInfoI[2*sz+3+i]);
+      _fs[i]=MEDCouplingFieldDouble::New(*ft[i],(TypeOfTimeDiscretization)tinyInfoI[2*sz+3+i]);
       int sz3=tinyInfoI[sz+i+3];
       std::vector<DataArrayDouble *> tmp(sz3);
       for(int j=0;j<sz3;j++,k++)