From: Anthony Geay Date: Wed, 29 Aug 2018 09:17:29 +0000 (+0200) Subject: Maybe X-Git-Tag: SHAPER_V9_1_0RC1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=61c112fce0f445ff45e9b587e45d81b097aed72a;p=modules%2Fmed.git Maybe --- diff --git a/src/MEDCalc/cmp/MEDDataManager_i.cxx b/src/MEDCalc/cmp/MEDDataManager_i.cxx index 5a7b01737..01d5f745f 100644 --- a/src/MEDCalc/cmp/MEDDataManager_i.cxx +++ b/src/MEDCalc/cmp/MEDDataManager_i.cxx @@ -641,13 +641,14 @@ MEDCouplingFieldDouble * MEDDataManager_i::getFieldDouble(const MEDCALC::FieldHa LOG("getFieldDouble: field "<fieldname<<" loaded from file "<type; int meshDimRelToMax = 0; - MCAuto myField = ReadField(type, + MCAuto myFieldTmpp(ReadField(type, filepath, meshName, meshDimRelToMax, std::string(fieldHandler->fieldname), fieldHandler->iteration, - fieldHandler->order); + fieldHandler->order)); + MCAuto myField(DynamicCast(myFieldTmpp)); myField->setMesh(myMesh); _fieldDoubleMap[fieldHandler->id] = myField.retn(); return myField; diff --git a/src/MEDCalculator/MEDCalculatorDBSliceField.cxx b/src/MEDCalculator/MEDCalculatorDBSliceField.cxx index e2d6e6631..9d18ce73a 100644 --- a/src/MEDCalculator/MEDCalculatorDBSliceField.cxx +++ b/src/MEDCalculator/MEDCalculatorDBSliceField.cxx @@ -96,7 +96,8 @@ MEDCouplingFieldDouble *MEDCalculatorDBSliceField::getField(TypeOfField type, co { if(!_field) { - MCAuto tmp(ReadField(type,fname.c_str(),mname.c_str(),0,fieldName.c_str(),_iteration,_order)); + MCAuto tmpp(ReadField(type,fname.c_str(),mname.c_str(),0,fieldName.c_str(),_iteration,_order)); + MCAuto tmp(DynamicCast(tmpp)); _field=tmp.retn(); } return _field;