From: Anthony Geay Date: Wed, 29 Aug 2018 08:59:22 +0000 (+0200) Subject: Fix compilation error due API modification (returned type) of ReadField X-Git-Tag: SHAPER_V9_1_0RC1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=662f5f9943e52f66cdaacee65ccbd145c4c656ce;p=modules%2Fmed.git Fix compilation error due API modification (returned type) of ReadField --- diff --git a/src/MEDCalculator/MEDCalculatorBrowserField.cxx b/src/MEDCalculator/MEDCalculatorBrowserField.cxx index 1559c2561..e26b1d359 100644 --- a/src/MEDCalculator/MEDCalculatorBrowserField.cxx +++ b/src/MEDCalculator/MEDCalculatorBrowserField.cxx @@ -63,12 +63,16 @@ MEDCalculatorBrowserField::MEDCalculatorBrowserField(const char *fname, const ch MCAuto tmpf; try { - tmpf=ReadField(_type,fname,meshNames[0].c_str(),0,fieldName,dtits[0].first.first,dtits[0].first.second); + MCAuto tmpf2(ReadField(_type,fname,meshNames[0].c_str(),0,fieldName,dtits[0].first.first,dtits[0].first.second)); + tmpf=DynamicCast(tmpf2); } catch(INTERP_KERNEL::Exception& e) { if(_type==ON_CELLS) - tmpf=ReadField(_type,fname,meshNames[0].c_str(),-1,fieldName,dtits[0].first.first,dtits[0].first.second); + { + MCAuto tmpf2(ReadField(_type,fname,meshNames[0].c_str(),-1,fieldName,dtits[0].first.first,dtits[0].first.second)); + tmpf=DynamicCast(tmpf2); + } else throw e; }