Fix harmless warning about using wxCONTROL_CHECKED in ternary operator.
Add wxCONTROL_NONE which is just a symbolic name for 0 and use it in the code to avoid g++ 4.8 warnings about mixing enum and int in conditional expression. Closes #16242. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,6 +52,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindow;
|
|||||||
// control state flags used in wxRenderer and wxColourScheme
|
// control state flags used in wxRenderer and wxColourScheme
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
wxCONTROL_NONE = 0x00000000, // absence of any other flags
|
||||||
wxCONTROL_DISABLED = 0x00000001, // control is disabled
|
wxCONTROL_DISABLED = 0x00000001, // control is disabled
|
||||||
wxCONTROL_FOCUSED = 0x00000002, // currently has keyboard focus
|
wxCONTROL_FOCUSED = 0x00000002, // currently has keyboard focus
|
||||||
wxCONTROL_PRESSED = 0x00000004, // (button) is pressed
|
wxCONTROL_PRESSED = 0x00000004, // (button) is pressed
|
||||||
|
@@ -12,6 +12,13 @@
|
|||||||
*/
|
*/
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
Default state, no special flags.
|
||||||
|
|
||||||
|
@since 3.1.0
|
||||||
|
*/
|
||||||
|
wxCONTROL_NONE = 0x00000000,
|
||||||
|
|
||||||
/** Control is disabled. */
|
/** Control is disabled. */
|
||||||
wxCONTROL_DISABLED = 0x00000001,
|
wxCONTROL_DISABLED = 0x00000001,
|
||||||
|
|
||||||
|
@@ -322,7 +322,7 @@ void wxRadioButton::MSWOnButtonResetOwnerDrawn()
|
|||||||
|
|
||||||
int wxRadioButton::MSWGetButtonCheckedFlag() const
|
int wxRadioButton::MSWGetButtonCheckedFlag() const
|
||||||
{
|
{
|
||||||
return m_isChecked ? wxCONTROL_CHECKED : 0;
|
return m_isChecked ? wxCONTROL_CHECKED : wxCONTROL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioButton::MSWDrawButtonBitmap(wxDC& dc, const wxRect& rect, int flags)
|
void wxRadioButton::MSWDrawButtonBitmap(wxDC& dc, const wxRect& rect, int flags)
|
||||||
|
Reference in New Issue
Block a user