]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
numeric_limits fix for Windows
authorViktor Uzlov <viktor.uzlov@opencascade.com>
Wed, 24 Feb 2021 06:47:54 +0000 (09:47 +0300)
committerViktor Uzlov <viktor.uzlov@opencascade.com>
Wed, 24 Feb 2021 06:47:54 +0000 (09:47 +0300)
src/SVTK/SVTK_Hash.h
src/VTKViewer/VTKViewer_Actor.h

index fb1562eb916729e162b507a7c208f258801734bd..de6ad30816bdfc41654c08e647b3f0caccd0ad98 100644 (file)
@@ -79,7 +79,7 @@ struct svtkIdHasher
 {
   static int HashCode(const vtkIdType theValue,  const int theUpperBound)
   {
-    return static_cast<int> ((theValue & std::numeric_limits<vtkIdType>::max()) % theUpperBound + 1);
+    return static_cast<int> ((theValue & (std::numeric_limits<vtkIdType>::max)()) % theUpperBound + 1);
   }
 
   static bool IsEqual( const vtkIdType& id1, const vtkIdType& id2 )
index a342a8de746d7d20d38755939f3d0add8c944487..465b9f893f051ed7dc6a9f70e37342f200a71f6b 100644 (file)
@@ -402,7 +402,7 @@ struct vtkIdHasher
 {
   static int HashCode(const vtkIdType theValue,  const int theUpperBound)
   {
-    return static_cast<int> ((theValue & std::numeric_limits<vtkIdType>::max()) % theUpperBound + 1);
+    return static_cast<int> ((theValue & (std::numeric_limits<vtkIdType>::max)()) % theUpperBound + 1);
   }
 
   static bool IsEqual( const vtkIdType& id1, const vtkIdType& id2 )