/////////////////////////////////////////////////////////////////////////////
-// Name: hash.cpp
+// Name: src/common/hash.cpp
// Purpose: wxHashTable implementation
// Author: Julian Smart
// Modified by: VZ at 25.02.00: type safe hashes with WX_DECLARE_HASH()
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "hash.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/list.h"
+ #include "wx/list.h"
+ #include "wx/hash.h"
#endif
-#include "wx/hash.h"
-
#if wxUSE_OLD_HASH_TABLE
#include <string.h>
wxString wxStringHashTable::Get(long key, bool *wasFound) const
{
- wxCHECK_MSG( m_hashSize, _T(""), _T("must call Create() first") );
+ wxCHECK_MSG( m_hashSize, wxEmptyString, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
if ( wasFound )
*wasFound = false;
- return _T("");
+ return wxEmptyString;
}
bool wxStringHashTable::Delete(long key) const
return int_key;
}
-//
+// ----------------------------------------------------------------------------
+// wxHashTable
+// ----------------------------------------------------------------------------
wxHashTable::wxHashTable( const wxHashTable& table )
+ : wxHashTableBase()
{
DoCopy( table );
}
{
Create( m_keyType, m_size );
- wxASSERT( false );
+ wxFAIL;
}
void wxHashTable::DoDeleteContents( wxHashTableBase_Node* node )