From 662f5f9943e52f66cdaacee65ccbd145c4c656ce Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 29 Aug 2018 10:59:22 +0200 Subject: [PATCH] Fix compilation error due API modification (returned type) of ReadField --- src/MEDCalculator/MEDCalculatorBrowserField.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.39.2