From 41285bc82f2e1df2fb99e3a77b4577aa36f860e9 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 2 Jan 2009 18:10:10 +0000 Subject: [PATCH] fix GCC warning "suggest explicit braces..." git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msgdlg.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 7c372cff6f..8645691499 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -153,20 +153,14 @@ public: wxASSERT_MSG( (style & wxID_OK) != wxID_OK, "wxMessageBox: Did you mean wxOK (and not wxID_OK)?" ); - if ((style & wxNO) == 0) - wxASSERT_MSG( !(style & wxNO_DEFAULT), - "wxNO_DEFAULT is invalid without wxNO" ); - - if ((style & wxCANCEL) == 0) - wxASSERT_MSG( !(style & wxCANCEL_DEFAULT), - "wxCANCEL_DEFAULT is invalid without wxCANCEL" ); - - if ((style & wxCANCEL_DEFAULT) != 0) - wxASSERT_MSG( !(style & wxNO_DEFAULT), - "only one default button can be specified" ); - if ((style & wxNO_DEFAULT) != 0) - wxASSERT_MSG( !(style & wxCANCEL_DEFAULT), - "only one default button can be specified" ); + if ((style & wxNO_DEFAULT) != 0 && (style & wxNO) == 0) + wxFAIL_MSG("wxNO_DEFAULT is invalid without wxNO"); + + if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxCANCEL) == 0) + wxFAIL_MSG("wxCANCEL_DEFAULT is invalid without wxCANCEL"); + + if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxNO_DEFAULT) != 0) + wxFAIL_MSG("only one default button can be specified"); #endif m_dialogStyle = style; -- 2.45.2