From cc56eed564f3135a21aa0e429998fe45826fbf5c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 May 2018 23:21:36 +0200 Subject: [PATCH] Avoid gcc8 -Wcast-function-type in hash map macros in Win64 build BucketFromNode typedef must be defined as a function returning size_t, as GetBucketForNode() method in the classes generated by hash map macros does, to avoid warnings about bad function pointer casts in Win64 build, where size_t is not the same thing as "unsigned long". --- include/wx/hashmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 371407e5a9..6289331e32 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -81,7 +81,7 @@ class WXDLLIMPEXP_BASE _wxHashTableBase2 { public: typedef void (*NodeDtor)(_wxHashTable_NodeBase*); - typedef unsigned long (*BucketFromNode)(_wxHashTableBase2*,_wxHashTable_NodeBase*); + typedef size_t (*BucketFromNode)(_wxHashTableBase2*,_wxHashTable_NodeBase*); typedef _wxHashTable_NodeBase* (*ProcessNode)(_wxHashTable_NodeBase*); protected: static _wxHashTable_NodeBase* DummyProcessNode(_wxHashTable_NodeBase* node);