we probably don't need crit section in GetTimeZone()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -222,16 +222,6 @@ const wxDateTime wxDefaultDateTime;
|
|||||||
|
|
||||||
wxDateTime::Country wxDateTime::ms_country = wxDateTime::Country_Unknown;
|
wxDateTime::Country wxDateTime::ms_country = wxDateTime::Country_Unknown;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// private globals
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// a critical section is needed to protect GetTimeZone() static
|
|
||||||
// variable in MT case
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
static wxCriticalSection gs_critsectTimezone;
|
|
||||||
#endif // wxUSE_THREADS
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private functions
|
// private functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -273,8 +263,6 @@ static int GetTimeZone()
|
|||||||
static long gmtoffset = LONG_MAX; // invalid timezone
|
static long gmtoffset = LONG_MAX; // invalid timezone
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxCRIT_SECT_LOCKER(lock, gs_critsectTimezone);
|
|
||||||
|
|
||||||
// ensure that the timezone variable is set by calling localtime
|
// ensure that the timezone variable is set by calling localtime
|
||||||
if ( !s_timezoneSet )
|
if ( !s_timezoneSet )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user