added copy ctor to wxHashTable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,6 +78,25 @@ bool wxHashTable::Create(int the_key_type, int size)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
void wxHashTable::DoCopy(const wxHashTable& table)
|
||||
{
|
||||
n = table.n;
|
||||
current_position = table.current_position;
|
||||
current_node = NULL; // doesn't matter - Next() will reconstruct it
|
||||
key_type = table.key_type;
|
||||
|
||||
hash_table = new wxList *[n];
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (table.hash_table[i] == NULL)
|
||||
hash_table[i] = NULL;
|
||||
else {
|
||||
hash_table[i] = new wxList(key_type);
|
||||
*(hash_table[i]) = *(table.hash_table[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxHashTable::Put (long key, long value, wxObject * object)
|
||||
{
|
||||
// Should NEVER be
|
||||
|
Reference in New Issue
Block a user