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".
This commit is contained in:
Vadim Zeitlin
2018-05-27 23:21:36 +02:00
parent a17a8f667f
commit cc56eed564

View File

@@ -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);