Use std::unordered_map<> in wxFileSystem
Use the standard containers directly instead of using wx synonyms.
This commit is contained in:
parent
f0ebc6efdf
commit
4697f3cdad
2 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue