Keep order of nodes when wxHashMap is resized; this ensures
that wxHashTable has the same behaviour when wxUSE_STL=1 as when wxUSE_STL=0. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -70,6 +70,7 @@ protected:
|
||||
static void CopyHashTable( _wxHashTable_NodeBase** srcTable,
|
||||
size_t srcBuckets, _wxHashTableBase2* dst,
|
||||
_wxHashTable_NodeBase** dstTable,
|
||||
size_t dstBuckets,
|
||||
BucketFromNode func, ProcessNode proc );
|
||||
|
||||
static void** AllocTable( size_t sz )
|
||||
@@ -357,7 +358,7 @@ protected: \
|
||||
m_tableBuckets = newSize; \
|
||||
\
|
||||
CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, \
|
||||
this, (_wxHashTable_NodeBase**)m_table, \
|
||||
this, (_wxHashTable_NodeBase**)m_table, newSize, \
|
||||
(BucketFromNode)GetBucketForNode,\
|
||||
(ProcessNode)&DummyProcessNode ); \
|
||||
free(srcTable); \
|
||||
@@ -369,7 +370,7 @@ protected: \
|
||||
ResizeTable( ht.size() ); \
|
||||
CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets,\
|
||||
(_wxHashTableBase2*)this, \
|
||||
(_wxHashTable_NodeBase**)m_table, \
|
||||
(_wxHashTable_NodeBase**)m_table, m_tableBuckets, \
|
||||
(BucketFromNode)GetBucketForNode, \
|
||||
(ProcessNode)CopyNode ); \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user