From: Viktor Uzlov Date: Wed, 24 Feb 2021 06:47:54 +0000 (+0300) Subject: numeric_limits fix for Windows X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7e27274730bd0b369131184dfb90ad92c127a678;p=modules%2Fgui.git numeric_limits fix for Windows --- diff --git a/src/SVTK/SVTK_Hash.h b/src/SVTK/SVTK_Hash.h index fb1562eb9..de6ad3081 100644 --- a/src/SVTK/SVTK_Hash.h +++ b/src/SVTK/SVTK_Hash.h @@ -79,7 +79,7 @@ struct svtkIdHasher { static int HashCode(const vtkIdType theValue, const int theUpperBound) { - return static_cast ((theValue & std::numeric_limits::max()) % theUpperBound + 1); + return static_cast ((theValue & (std::numeric_limits::max)()) % theUpperBound + 1); } static bool IsEqual( const vtkIdType& id1, const vtkIdType& id2 ) diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index a342a8de7..465b9f893 100644 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -402,7 +402,7 @@ struct vtkIdHasher { static int HashCode(const vtkIdType theValue, const int theUpperBound) { - return static_cast ((theValue & std::numeric_limits::max()) % theUpperBound + 1); + return static_cast ((theValue & (std::numeric_limits::max)()) % theUpperBound + 1); } static bool IsEqual( const vtkIdType& id1, const vtkIdType& id2 )