Ticket #3803: filezilla-02-multimap-const.diff

File filezilla-02-multimap-const.diff, 828 bytes (added by Alfred Peng, 16 years ago)

The patch to fix the first error

  • filezilla-3.1.3/src/engine/directorylisting.cpp

    old new  
    409409    for (; entry_iter != m_pEntries->end(); entry_iter++, i++)
    410410    {
    411411        const wxString& entry_name = entry_iter->GetEntry().name;
    412         m_searchmap_case->insert(std::pair<wxString, unsigned int>(entry_name, i));
     412        m_searchmap_case->insert(std::pair<const wxString, unsigned int>(entry_name, i));
    413413
    414414        if (entry_name == name)
    415415            return i;
     
    439439    {
    440440        wxString entry_name = entry_iter->GetEntry().name;
    441441        entry_name.MakeLower();
    442         m_searchmap_nocase->insert(std::pair<wxString, unsigned int>(entry_name, i));
     442        m_searchmap_nocase->insert(std::pair<const wxString, unsigned int>(entry_name, i));
    443443
    444444        if (entry_name == name)
    445445            return i;