X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5f56a004e0df9151d0ae1ca0565eabc761f00a6..606b005fb2b535b34d1ca45d2d06ee86718e8b1c:/src/msw/thread.cpp diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index a743d287b0..f76f9a4c7b 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -327,8 +327,14 @@ void wxCondition::Broadcast() wxCriticalSection::wxCriticalSection() { - wxASSERT_MSG( sizeof(CRITICAL_SECTION) <= sizeof(m_buffer), +#ifdef __WXDEBUG__ + // Done this way to stop warnings during compilation about statement + // always being false + int csSize = sizeof(CRITICAL_SECTION); + int bSize = sizeof(m_buffer); + wxASSERT_MSG( csSize <= bSize, _T("must increase buffer size in wx/thread.h") ); +#endif ::InitializeCriticalSection((CRITICAL_SECTION *)m_buffer); }