]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/hash.cpp
don't crash if conversion of a command line argument to Unicode fails
[wxWidgets.git] / src / common / hash.cpp
index c9a0c31aa03205de91aee1df34b9be74d4cc76f5..bc1a7583aaeaed8c920ea463de95462de9408a20 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// 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"
 
@@ -288,7 +284,7 @@ void wxStringHashTable::Put(long key, const wxString& value)
 
 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));
 
@@ -311,7 +307,7 @@ wxString wxStringHashTable::Get(long key, bool *wasFound) const
     if ( wasFound )
         *wasFound = false;
 
-    return _T("");
+    return wxEmptyString;
 }
 
 bool wxStringHashTable::Delete(long key) const
@@ -1040,7 +1036,7 @@ void wxHashTable::DoCopy( const wxHashTable& WXUNUSED(table) )
 {
     Create( m_keyType, m_size );
 
-    wxASSERT( false );
+    wxFAIL;
 }
 
 void wxHashTable::DoDeleteContents( wxHashTableBase_Node* node )