Don't use g_thread_supported() with non-ancient glib versions
This is useless, as it always returns true (since 2.31), and just results in warnings about using deprecated macro (since 2.62). Also remove the now unnecessary warning suppression macros, as g_thread_init() wasn't deprecated in 2.30 yet, so it shouldn't give any warnings in glib versions in which it could be actually used.
This commit is contained in:
parent
85b37bea49
commit
19c6e004ce
@ -276,6 +276,8 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
|
||||
if ( !wxAppBase::Initialize(argc_, argv_) )
|
||||
return false;
|
||||
|
||||
// Thread support is always on since glib 2.31.
|
||||
#if !GLIB_CHECK_VERSION(2, 31, 0)
|
||||
#if wxUSE_THREADS
|
||||
if (!g_thread_supported())
|
||||
{
|
||||
@ -283,12 +285,11 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
|
||||
// might still be needed in the older versions, which are the only ones
|
||||
// for which this code is going to be executed (as g_thread_supported()
|
||||
// is always TRUE in these recent glib versions anyhow).
|
||||
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
|
||||
g_thread_init(NULL);
|
||||
wxGCC_WARNING_RESTORE()
|
||||
gdk_threads_init();
|
||||
}
|
||||
#endif // wxUSE_THREADS
|
||||
#endif // glib < 2.31
|
||||
|
||||
// gtk+ 2.0 supports Unicode through UTF-8 strings
|
||||
wxConvCurrent = &wxConvUTF8;
|
||||
|
Loading…
Reference in New Issue
Block a user