0026581: Eliminate compile warnings obtained by building occt with vc14: 'type cast...
authorrkv <rkv@opencascade.com>
Fri, 2 Oct 2015 13:18:58 +0000 (16:18 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 15 Oct 2015 08:26:55 +0000 (11:26 +0300)
src/BOPCol/BOPCol_Parallel.hxx
src/Standard/Standard_ThreadId.hxx

index d8088ae..2204a0c 100644 (file)
@@ -87,7 +87,7 @@ class BOPCol_ContextFunctor
     static Standard_Integer HashCode(const Standard_ThreadId theKey,
                                      const Standard_Integer  Upper)
     {
-      return ::HashCode(reinterpret_cast<Standard_Address>(theKey), Upper);
+      return ::HashCode(theKey, Upper);
     }
 
     static Standard_Boolean IsEqual(const Standard_ThreadId theKey1,
index a129f38..5ebc667 100644 (file)
 #include <windows.h>
 typedef DWORD Standard_ThreadId;
 
+inline Standard_Integer HashCode(const Standard_ThreadId Value,
+  const Standard_Integer Upper)
+{
+  // Size of int == size of unsigned long == 4 for WIN32 and WIN64
+  return HashCode((Standard_Integer)Value, Upper);
+}
+
 #else
 
 #include <pthread.h>