Changed code to get rid of a compiler warning about statement always being FALSE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5f6d6405bb
commit
35cd9dba7b
@ -327,8 +327,14 @@ void wxCondition::Broadcast()
|
|||||||
|
|
||||||
wxCriticalSection::wxCriticalSection()
|
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") );
|
_T("must increase buffer size in wx/thread.h") );
|
||||||
|
#endif
|
||||||
|
|
||||||
::InitializeCriticalSection((CRITICAL_SECTION *)m_buffer);
|
::InitializeCriticalSection((CRITICAL_SECTION *)m_buffer);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user