From 61c112fce0f445ff45e9b587e45d81b097aed72a Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 29 Aug 2018 11:17:29 +0200 Subject: [PATCH] Maybe --- src/MEDCalc/cmp/MEDDataManager_i.cxx | 5 +++-- src/MEDCalculator/MEDCalculatorDBSliceField.cxx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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; -- 2.39.2