From 5a9487c4ceb96e1813020ea2157d14ce34166a91 Mon Sep 17 00:00:00 2001 From: rkv Date: Fri, 2 Oct 2015 16:18:58 +0300 Subject: [PATCH] 0026581: Eliminate compile warnings obtained by building occt with vc14: 'type cast' conversion --- src/BOPCol/BOPCol_Parallel.hxx | 2 +- src/Standard/Standard_ThreadId.hxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/BOPCol/BOPCol_Parallel.hxx b/src/BOPCol/BOPCol_Parallel.hxx index d8088aebef..2204a0cb43 100644 --- a/src/BOPCol/BOPCol_Parallel.hxx +++ b/src/BOPCol/BOPCol_Parallel.hxx @@ -87,7 +87,7 @@ class BOPCol_ContextFunctor static Standard_Integer HashCode(const Standard_ThreadId theKey, const Standard_Integer Upper) { - return ::HashCode(reinterpret_cast(theKey), Upper); + return ::HashCode(theKey, Upper); } static Standard_Boolean IsEqual(const Standard_ThreadId theKey1, diff --git a/src/Standard/Standard_ThreadId.hxx b/src/Standard/Standard_ThreadId.hxx index a129f3886a..5ebc667fad 100644 --- a/src/Standard/Standard_ThreadId.hxx +++ b/src/Standard/Standard_ThreadId.hxx @@ -23,6 +23,13 @@ #include 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 -- 2.39.5