X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bc4758090e3a725bf5b29ff89c49d6f77eebf04..cbeda384e51acb82e13994cb67ac1714669cae10:/include/wx/msgdlg.h diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 7c372cff6f..8e0e0a9bb7 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -140,7 +140,6 @@ public: // change the dialog style flag void SetMessageDialogStyle(long style) { -#ifdef __WXDEBUG__ wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || !(style & wxYES_NO), "wxYES and wxNO may only be used together" ); @@ -153,21 +152,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" ); + wxASSERT_MSG( !(style & wxNO_DEFAULT) || (style & wxNO), + "wxNO_DEFAULT is invalid without wxNO" ); - if ((style & wxCANCEL) == 0) - wxASSERT_MSG( !(style & wxCANCEL_DEFAULT), - "wxCANCEL_DEFAULT is invalid without wxCANCEL" ); + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || (style & wxCANCEL), + "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" ); -#endif + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || !(style & wxNO), + "only one default button can be specified" ); m_dialogStyle = style; } @@ -192,7 +184,7 @@ protected: m_caption; long m_dialogStyle; - DECLARE_NO_COPY_CLASS(wxMessageDialogBase) + wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase); }; // this is a helper class for native wxMessageDialog implementations which need @@ -296,7 +288,7 @@ private: m_ok, m_cancel; - DECLARE_NO_COPY_CLASS(wxMessageDialogWithCustomLabels) + wxDECLARE_NO_COPY_CLASS(wxMessageDialogWithCustomLabels); }; #endif // ports needing wxMessageDialogWithCustomLabels