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:
@@ -18,14 +18,14 @@ class wxGtkValue
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit wxGtkValue()
|
explicit wxGtkValue()
|
||||||
: m_val(G_VALUE_INIT)
|
|
||||||
{
|
{
|
||||||
|
memset(&m_val, 0, sizeof(m_val));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the value of the specified type.
|
// Initialize the value of the specified type.
|
||||||
explicit wxGtkValue(GType gtype)
|
explicit wxGtkValue(GType gtype)
|
||||||
: m_val(G_VALUE_INIT)
|
|
||||||
{
|
{
|
||||||
|
memset(&m_val, 0, sizeof(m_val));
|
||||||
g_value_init(&m_val, gtype);
|
g_value_init(&m_val, gtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user