Skip to content

Commit

Permalink
+ handle usage of libmedc < 3.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 14, 2016
1 parent ff060d4 commit f1d5900
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/3rdParty/salomesmesh/src/SMESH/MED_V2_2_Wrapper.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1027,11 +1032,15 @@ namespace MED
TValueHolder<EGeometrieElement, med_geometry_type> aGeom (anInfo.myGeom);
TValueHolder<EConnectivite, med_connectivity_mode> 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)
Expand Down

0 comments on commit f1d5900

Please sign in to comment.