X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5f56a004e0df9151d0ae1ca0565eabc761f00a6..6dab3ba7e5201f506a841cf1442ddf0ef00b1160:/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); }