Make wxEnvVariableHashMap just a std::unordered_map<>
Use the standard container directly instead of using a wx synonym for
it, this is more clear.
Use the same hack here as in e13dbd4278 (Use std::unordered_map<> in
wxMsgCatalog and related classes, 2023-04-12) to allow the existing code
including this header keep using the functions from wx/wxcrt.h without
including it explicitly.
This commit is contained in:
parent
83773cec9a
commit
8a8fee442f
2 changed files with 11 additions and 3 deletions
|
|
@ -18,7 +18,6 @@
|
|||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/hashmap.h"
|
||||
#include "wx/versioninfo.h"
|
||||
#include "wx/meta/implicitconversion.h"
|
||||
|
||||
|
|
@ -38,6 +37,13 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt;
|
|||
// needed for wxOperatingSystemId, wxLinuxDistributionInfo
|
||||
#include "wx/platinfo.h"
|
||||
|
||||
// This is a hack, but this header used to include wx/hashmap.h which, in turn,
|
||||
// included wx/wxcrt.h and it turns out quite some existing code relied on it
|
||||
// by using the CRT wrapper functions declared there without explicitly
|
||||
// including that header, so keep including it from here to let it continue to
|
||||
// compile.
|
||||
#include "wx/wxcrt.h"
|
||||
|
||||
#if defined(__X__)
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
|
@ -45,6 +51,8 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt;
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Forward declaration
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
@ -366,7 +374,7 @@ enum
|
|||
};
|
||||
|
||||
// Map storing environment variables.
|
||||
typedef wxStringToStringHashMap wxEnvVariableHashMap;
|
||||
using wxEnvVariableHashMap = std::unordered_map<wxString, wxString>;
|
||||
|
||||
// Used to pass additional parameters for child process to wxExecute(). Could
|
||||
// be extended with other fields later.
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ wxVersionInfo wxGetLibraryVersionInfo();
|
|||
|
||||
@header{wx/utils.h}
|
||||
*/
|
||||
typedef wxStringToStringHashMap wxEnvVariableHashMap;
|
||||
using wxEnvVariableHashMap = std::unordered_map<wxString, wxString>;
|
||||
|
||||
/**
|
||||
This is a macro defined as @c getenv() or its wide char version in Unicode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue