Moved some methods/classes inside COMPATIBILITY_2_4.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-07-03 21:59:55 +00:00
parent 2ea4a2f552
commit ba8c160144
19 changed files with 132 additions and 52 deletions

View File

@@ -26,7 +26,7 @@
#include "wx/log.h"
#endif
#include "wx/hash.h"
#include "wx/hashmap.h"
#include "wx/filesys.h"
#include "wx/zipstrm.h"
#include "wx/fs_zip.h"
@@ -38,6 +38,8 @@
#include "unzip.h"
#endif
WX_DECLARE_EXPORTED_HASH_MAP( long, long, wxIntegerHash, wxIntegerEqual,
wxLongToLongHashMap );
//----------------------------------------------------------------------------
// wxZipFSHandler
@@ -165,7 +167,7 @@ wxString wxZipFSHandler::FindFirst(const wxString& spec, int flags)
if (m_AllowDirs)
{
delete m_DirsFound;
m_DirsFound = new wxHashTableLong();
m_DirsFound = new wxLongToLongHashMap();
}
return DoFind();
}
@@ -203,9 +205,10 @@ wxString wxZipFSHandler::DoFind()
{
long key = 0;
for (size_t i = 0; i < dir.Length(); i++) key += (wxUChar)dir[i];
if (m_DirsFound->Get(key) == wxNOT_FOUND)
wxLongToLongHashMap::iterator it = m_DirsFound->find(key);
if (it == m_DirsFound->end())
{
m_DirsFound->Put(key, 1);
m_DirsFound[key] = 1;
filename = dir.AfterLast(wxT('/'));
dir = dir.BeforeLast(wxT('/'));
if (!filename.IsEmpty() && m_BaseDir == dir &&