- 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_DEFAULT),
+ "only one default button can be specified" );