Initialize wxGtkValue in a way not requiring C++11

As we still support C++98, don't use G_VALUE_INIT as the initializer:
it's a braced-init-list, which is only allowed in C++11.

Co-Authored-By: Paul Cornett <paulcor@users.noreply.github.com>
This commit is contained in:
Vadim Zeitlin
2021-01-25 00:49:27 +01:00
parent 3568a160a9
commit fa4339a935

View File

@@ -18,14 +18,14 @@ class wxGtkValue
{
public:
explicit wxGtkValue()
: m_val(G_VALUE_INIT)
{
memset(&m_val, 0, sizeof(m_val));
}
// Initialize the value of the specified type.
explicit wxGtkValue(GType gtype)
: m_val(G_VALUE_INIT)
{
memset(&m_val, 0, sizeof(m_val));
g_value_init(&m_val, gtype);
}