From 7e27274730bd0b369131184dfb90ad92c127a678 Mon Sep 17 00:00:00 2001 From: Viktor Uzlov Date: Wed, 24 Feb 2021 09:47:54 +0300 Subject: [PATCH] numeric_limits fix for Windows --- src/SVTK/SVTK_Hash.h | 2 +- src/VTKViewer/VTKViewer_Actor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ) -- 2.39.2