Use std::unordered_map<> in private wxWebRequest headers

Replace wx synonym with the direct use of the standard class.
This commit is contained in:
Vadim Zeitlin 2023-04-17 22:57:38 +01:00
parent b1530a52e2
commit 97b5d13038
2 changed files with 6 additions and 8 deletions

View file

@ -11,13 +11,13 @@
#define _WX_PRIVATE_WEBREQUEST_H_
#include "wx/ffile.h"
#include "wx/hashmap.h"
#include "wx/private/refcountermt.h"
#include <memory>
#include <unordered_map>
WX_DECLARE_STRING_HASH_MAP(wxString, wxWebRequestHeaderMap);
using wxWebRequestHeaderMap = std::unordered_map<wxString, wxString>;
// Default buffer size when a fixed-size buffer must be used.
const int wxWEBREQUEST_BUFFER_SIZE = 64 * 1024;

View file

@ -17,10 +17,11 @@
#include "wx/thread.h"
#include "wx/vector.h"
#include "wx/timer.h"
#include "wx/hashmap.h"
#include "curl/curl.h"
#include <unordered_map>
class wxWebRequestCURL;
class wxWebResponseCURL;
class wxWebSessionCURL;
@ -171,11 +172,8 @@ private:
void StopActiveTransfer(CURL*);
void RemoveActiveSocket(CURL*);
WX_DECLARE_HASH_MAP(CURL*, wxWebRequestCURL*, wxPointerHash, \
wxPointerEqual, TransferSet);
WX_DECLARE_HASH_MAP(CURL*, curl_socket_t, wxPointerHash, \
wxPointerEqual, CurlSocketMap);
using TransferSet = std::unordered_map<CURL*, wxWebRequestCURL*>;
using CurlSocketMap = std::unordered_map<CURL*, curl_socket_t>;
TransferSet m_activeTransfers;
CurlSocketMap m_activeSockets;