Merge branch 'use-std-hash'

Use std::unordered_foo instead of wx hash maps.

See #23462.
This commit is contained in:
Vadim Zeitlin 2023-04-18 14:38:12 +02:00
commit ae13d70ddc
56 changed files with 456 additions and 486 deletions

View file

@ -24,11 +24,10 @@
#include "wx/filename.h"
#include "wx/wfstream.h"
#include "wx/utils.h"
#include "wx/hashset.h"
#include "wx/mimetype.h"
#include "wx/vector.h"
WX_DECLARE_HASH_SET(wxString, wxStringHash, wxStringEqual, StringSet);
#include <unordered_set>
class XRCWidgetData
{
@ -51,7 +50,7 @@ class XRCWndClassData
private:
wxString m_className;
wxString m_parentClassName;
StringSet m_ancestorClassNames;
std::unordered_set<wxString> m_ancestorClassNames;
ArrayOfXRCWidgetData m_wdata;
void BrowseXmlNode(wxXmlNode* node)
@ -184,11 +183,9 @@ public:
wxT(" }\n")
wxT("};\n"));
for ( StringSet::const_iterator it = m_ancestorClassNames.begin();
it != m_ancestorClassNames.end();
++it )
for ( const auto& name : m_ancestorClassNames )
{
file.Write(m_className + wxT("(") + *it + wxT(" *parent){\n") +
file.Write(m_className + wxT("(") + name + wxT(" *parent){\n") +
wxT(" InitWidgetsFromXRC((wxWindow *)parent);\n")
wxT(" }\n")
wxT("};\n"));