Salome HOME
Copyright update 2022
[modules/smesh.git] / src / Driver / Driver_Mesh.h
index a1af52641f04b2e6e9fe6e4a9ce8df17b7b7651d..9966c185cdabb0eb6e05065216734288e27c5ae5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -32,6 +32,7 @@
 
 #include <string>
 #include <vector>
+#include <smIdType.hxx>
 
 #ifdef WIN32
  #if defined MESHDRIVER_EXPORTS || defined MeshDriver_EXPORTS
@@ -72,8 +73,6 @@ class MESHDRIVER_EXPORT Driver_Mesh
 
   virtual SMESH_ComputeErrorPtr GetError();
 
-  //virtual bool CanExportMesh() const { return false; } //= 0;
-
   // check if a mesh is too large to export it using IDTYPE;
   // check either max ID or number of elements
   template< typename IDTYPE >
@@ -81,7 +80,7 @@ class MESHDRIVER_EXPORT Driver_Mesh
   {
     if ( sizeof( IDTYPE ) < sizeof( smIdType ))
     {
-      const smIdType maxNB = std::numeric_limits< IDTYPE >::max();
+      const smIdType maxNB = ToSmIdType( std::numeric_limits< IDTYPE >::max() );
       return (( checkIDs ? mesh->MaxNodeID()    : mesh->NbNodes() )  > maxNB ||
               ( checkIDs ? mesh->MaxElementID() : mesh->NbElements() > maxNB ));
     }