From: Vadim Zeitlin Date: Mon, 23 Mar 2009 13:10:19 +0000 (+0000) Subject: fix warnings about empty controlling statement in release build X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9053c7b9c158d15c33f7b61f4fc082f85cb4b41f fix warnings about empty controlling statement in release build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 4d822d3dc0..8e0e0a9bb7 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -152,14 +152,14 @@ public: wxASSERT_MSG( (style & wxID_OK) != wxID_OK, "wxMessageBox: Did you mean wxOK (and not wxID_OK)?" ); - if ((style & wxNO_DEFAULT) != 0 && (style & wxNO) == 0) - wxFAIL_MSG("wxNO_DEFAULT is invalid without wxNO"); + wxASSERT_MSG( !(style & wxNO_DEFAULT) || (style & wxNO), + "wxNO_DEFAULT is invalid without wxNO" ); - if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxCANCEL) == 0) - wxFAIL_MSG("wxCANCEL_DEFAULT is invalid without wxCANCEL"); + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || (style & wxCANCEL), + "wxCANCEL_DEFAULT is invalid without wxCANCEL" ); - if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxNO_DEFAULT) != 0) - wxFAIL_MSG("only one default button can be specified"); + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || !(style & wxNO), + "only one default button can be specified" ); m_dialogStyle = style; }