Add ctor to wxArtStockMapping to fix C++98 build
Can't use aggregate initialization without C++11.
This commit is contained in:
@@ -56,14 +56,19 @@ wxString wxArtIDToStock(const wxArtID& id)
|
|||||||
{
|
{
|
||||||
struct wxArtStockMapping
|
struct wxArtStockMapping
|
||||||
{
|
{
|
||||||
wxArtID artId;
|
wxArtStockMapping(const wxArtID& artId, const wxString& stockId)
|
||||||
wxString stockId;
|
: m_artId(artId), m_stockId(stockId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
wxArtID m_artId;
|
||||||
|
wxString m_stockId;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
#define ART(wxId, unused, themeId) wxArtStockMapping{wxId, themeId},
|
#define ART(wxId, unused, themeId) wxArtStockMapping(wxId, themeId),
|
||||||
#else
|
#else
|
||||||
#define ART(wxId, stockId, unused) wxArtStockMapping{wxId, stockId},
|
#define ART(wxId, stockId, unused) wxArtStockMapping(wxId, stockId),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const wxArtStockMapping wxId2GtkMap[] =
|
static const wxArtStockMapping wxId2GtkMap[] =
|
||||||
@@ -140,9 +145,9 @@ wxString wxArtIDToStock(const wxArtID& id)
|
|||||||
|
|
||||||
for (unsigned i = 0; i < WXSIZEOF(wxId2GtkMap); i++)
|
for (unsigned i = 0; i < WXSIZEOF(wxId2GtkMap); i++)
|
||||||
{
|
{
|
||||||
if (id == wxId2GtkMap[i].artId)
|
if (id == wxId2GtkMap[i].m_artId)
|
||||||
{
|
{
|
||||||
return wxId2GtkMap[i].stockId;
|
return wxId2GtkMap[i].m_stockId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return id;
|
return id;
|
||||||
|
Reference in New Issue
Block a user