X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30e671a59f943a03b2aea6b3b7880a221a422a19..50dee7e0ebbe05574116dce391596ddc55d644be:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 4f1df66c7e..6c87ccc236 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -75,8 +75,6 @@ #include "wx/tokenzr.h" #include "wx/module.h" -#define wxDEFINE_TIME_CONSTANTS // before including datetime.h - #include #include "wx/datetime.h" @@ -162,7 +160,7 @@ public: virtual void OnExit() { wxDateTimeHolidayAuthority::ClearAllAuthorities(); - wxDateTimeHolidayAuthority::ms_authorities.Clear(); + wxDateTimeHolidayAuthority::ms_authorities.clear(); } private: @@ -224,16 +222,6 @@ const wxDateTime wxDefaultDateTime; 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 // ---------------------------------------------------------------------------- @@ -275,8 +263,6 @@ static int GetTimeZone() static long gmtoffset = LONG_MAX; // invalid timezone #endif - wxCRIT_SECT_LOCKER(lock, gs_critsectTimezone); - // ensure that the timezone variable is set by calling localtime if ( !s_timezoneSet ) { @@ -3816,7 +3802,7 @@ wxHolidayAuthoritiesArray wxDateTimeHolidayAuthority::ms_authorities; /* static */ bool wxDateTimeHolidayAuthority::IsHoliday(const wxDateTime& dt) { - size_t count = ms_authorities.GetCount(); + size_t count = ms_authorities.size(); for ( size_t n = 0; n < count; n++ ) { if ( ms_authorities[n]->DoIsHoliday(dt) ) @@ -3836,9 +3822,9 @@ wxDateTimeHolidayAuthority::GetHolidaysInRange(const wxDateTime& dtStart, { wxDateTimeArray hol; - holidays.Empty(); + holidays.Clear(); - size_t count = ms_authorities.GetCount(); + size_t count = ms_authorities.size(); for ( size_t nAuth = 0; nAuth < count; nAuth++ ) { ms_authorities[nAuth]->DoGetHolidaysInRange(dtStart, dtEnd, hol); @@ -3848,7 +3834,7 @@ wxDateTimeHolidayAuthority::GetHolidaysInRange(const wxDateTime& dtStart, holidays.Sort(wxDateTimeCompareFunc); - return holidays.GetCount(); + return holidays.size(); } /* static */ @@ -3860,7 +3846,7 @@ void wxDateTimeHolidayAuthority::ClearAllAuthorities() /* static */ void wxDateTimeHolidayAuthority::AddAuthority(wxDateTimeHolidayAuthority *auth) { - ms_authorities.Add(auth); + ms_authorities.push_back(auth); } wxDateTimeHolidayAuthority::~wxDateTimeHolidayAuthority()