diff --git a/src/common/cshelp.cpp b/src/common/cshelp.cpp index 360a7f86be..a532528bb1 100644 --- a/src/common/cshelp.cpp +++ b/src/common/cshelp.cpp @@ -352,8 +352,9 @@ void wxSimpleHelpProvider::AddHelp(wxWindowBase *window, const wxString& text) void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text) { - m_hashIds.erase((long)id); - m_hashIds[id] = text; + wxLongToStringHashMap::const_key_type key = (wxLongToStringHashMap::const_key_type)id; + m_hashIds.erase(key); + m_hashIds[key] = text; } // removes the association