From 0624108accf5c9b663204a11f12eea30898ab6b8 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 20 Aug 2017 21:28:46 +0200 Subject: [PATCH] Use dedicated function to check whether menu item is a radio button No real changes, just refactoring. --- src/msw/menu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 3066b81571..1f88d96a92 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -360,7 +360,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) // the group, but inserting non-radio item breaks it into two subgroups.) // bool checkInitially = false; - if ( pItem->GetKind() == wxITEM_RADIO ) + if ( pItem->IsRadio() ) { if ( !m_radioData ) m_radioData = new wxMenuRadioItemsData; @@ -627,7 +627,7 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item) { if ( m_radioData->UpdateOnRemoveItem(pos) ) { - wxASSERT_MSG( item->GetKind() == wxITEM_RADIO, + wxASSERT_MSG( item->IsRadio(), wxT("Removing non radio button from radio group?") ); } //else: item being removed is not in a radio group @@ -778,7 +778,7 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id_) wxMenuItem * const item = FindItem(id); if ( item ) { - if ( (item->GetKind() == wxITEM_RADIO) && item->IsChecked() ) + if ( item->IsRadio() && item->IsChecked() ) return true; if ( item->IsCheckable() )