Use std::unordered_map<> in wxFileSystem

Use the standard containers directly instead of using wx synonyms.
This commit is contained in:
Vadim Zeitlin 2023-04-17 20:06:42 +01:00
parent f0ebc6efdf
commit 4697f3cdad
2 changed files with 5 additions and 3 deletions

View file

@ -16,7 +16,8 @@
#include "wx/stream.h" #include "wx/stream.h"
#include "wx/datetime.h" #include "wx/datetime.h"
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/hashmap.h"
#include <unordered_map>
class WXDLLIMPEXP_FWD_BASE wxFSFile; class WXDLLIMPEXP_FWD_BASE wxFSFile;
class WXDLLIMPEXP_FWD_BASE wxFileSystemHandler; class WXDLLIMPEXP_FWD_BASE wxFileSystemHandler;
@ -165,7 +166,7 @@ enum wxFileSystemOpenFlags
wxFS_SEEKABLE = 4 // Returned stream will be seekable wxFS_SEEKABLE = 4 // Returned stream will be seekable
}; };
WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL(wxFileSystemHandler*, wxFSHandlerHash, class WXDLLIMPEXP_BASE); using wxFSHandlerHash = std::unordered_map<void*, wxFileSystemHandler*>;
class WXDLLIMPEXP_BASE wxFileSystem : public wxObject class WXDLLIMPEXP_BASE wxFileSystem : public wxObject
{ {

View file

@ -334,7 +334,8 @@ wxList wxFileSystem::m_Handlers;
wxFileSystem::~wxFileSystem() wxFileSystem::~wxFileSystem()
{ {
WX_CLEAR_HASH_MAP(wxFSHandlerHash, m_LocalHandlers) for ( const auto& kv : m_LocalHandlers )
delete kv.second;
} }