From fa4339a93572c6107fb56e3cd7aa8ffbd097a8f3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Jan 2021 00:49:27 +0100 Subject: [PATCH] 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 --- include/wx/gtk/private/value.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/gtk/private/value.h b/include/wx/gtk/private/value.h index fbf1a08593..0b480b4050 100644 --- a/include/wx/gtk/private/value.h +++ b/include/wx/gtk/private/value.h @@ -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); }