X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5f56a004e0df9151d0ae1ca0565eabc761f00a6..53997bc265b691aaf12fafd259a5a2d2a27b0565:/src/msw/thread.cpp?ds=inline 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); }