From f1d59002be6dc951829f16aa8b499c2cf307731f Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 14 Jul 2016 21:35:13 +0200 Subject: [PATCH] + handle usage of libmedc < 3.0.7 --- src/3rdParty/salomesmesh/src/SMESH/MED_V2_2_Wrapper.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/3rdParty/salomesmesh/src/SMESH/MED_V2_2_Wrapper.cpp b/src/3rdParty/salomesmesh/src/SMESH/MED_V2_2_Wrapper.cpp index 549f1944a..6f35ed6b4 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/MED_V2_2_Wrapper.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/MED_V2_2_Wrapper.cpp @@ -33,6 +33,7 @@ static int MYDEBUG = 0; // static int MYDEBUG = 0; #endif +#define MED_VERSION_HEX (MED_NUM_MAJEUR << 16 | MED_NUM_MINEUR << 8 | MED_NUM_RELEASE) namespace MED @@ -969,10 +970,14 @@ namespace MED TInt aNbElem = (TInt)theInfo.myElemNum->size(); TErr aRet; +#if MED_VERSION_HEX < 0x030007 + aRet = -1; +#else aRet = MEDmeshPolygon2Rd(myFile->Id(), &aMeshName, MED_NO_DT, MED_NO_IT, anEntity, aGeom, aConnMode, &anIndex, &aConn); +#endif if(theErr) *theErr = aRet; @@ -1027,11 +1032,15 @@ namespace MED TValueHolder aGeom (anInfo.myGeom); TValueHolder aConnMode(anInfo.myConnMode); +#if MED_VERSION_HEX < 0x030007 + TErr aRet = -1; +#else TErr aRet = MEDmeshPolygon2Wr(myFile->Id(), &aMeshName, MED_NO_DT, MED_NO_IT, MED_UNDEF_DT, anEntity, aGeom, aConnMode, anInfo.myNbElem + 1, &anIndex, &aConn); +#endif if(theErr) *theErr = aRet; else if(aRet < 0)