diff --git a/common/widgets/widget_hotkey_list.cpp b/common/widgets/widget_hotkey_list.cpp index 2a59cbb83b..ffb31d40c8 100644 --- a/common/widgets/widget_hotkey_list.cpp +++ b/common/widgets/widget_hotkey_list.cpp @@ -300,18 +300,6 @@ WIDGET_HOTKEY_CLIENT_DATA* WIDGET_HOTKEY_LIST::getHKClientData( wxTreeListItem a } -WIDGET_HOTKEY_CLIENT_DATA* WIDGET_HOTKEY_LIST::getExpectedHkClientData( wxTreeListItem aItem ) -{ - const auto hkdata = getHKClientData( aItem ); - - // This probably means a hotkey-only action is being attempted on - // a row that is not a hotkey (like a section heading) - wxASSERT_MSG( hkdata != nullptr, "No hotkey data found for list item" ); - - return hkdata; -} - - void WIDGET_HOTKEY_LIST::updateFromClientData() { for( wxTreeListItem i = GetFirstItem(); i.IsOk(); i = GetNextItem( i ) ) @@ -369,7 +357,7 @@ void WIDGET_HOTKEY_LIST::changeHotkey( HOTKEY& aHotkey, long aKey, bool alternat void WIDGET_HOTKEY_LIST::editItem( wxTreeListItem aItem, int aEditId ) { - WIDGET_HOTKEY_CLIENT_DATA* hkdata = getExpectedHkClientData( aItem ); + WIDGET_HOTKEY_CLIENT_DATA* hkdata = getHKClientData( aItem ); if( !hkdata ) return; @@ -403,7 +391,7 @@ void WIDGET_HOTKEY_LIST::editItem( wxTreeListItem aItem, int aEditId ) void WIDGET_HOTKEY_LIST::resetItem( wxTreeListItem aItem, int aResetId ) { - WIDGET_HOTKEY_CLIENT_DATA* hkdata = getExpectedHkClientData( aItem ); + WIDGET_HOTKEY_CLIENT_DATA* hkdata = getHKClientData( aItem ); if( !hkdata ) return; diff --git a/include/widgets/widget_hotkey_list.h b/include/widgets/widget_hotkey_list.h index cb6a8a9efd..97c60cd784 100644 --- a/include/widgets/widget_hotkey_list.h +++ b/include/widgets/widget_hotkey_list.h @@ -142,12 +142,6 @@ private: */ WIDGET_HOTKEY_CLIENT_DATA* getHKClientData( wxTreeListItem aItem ); - /** - * Get the WIDGET_HOTKEY_CLIENT_DATA form an item and assert if it isn't found. This is for - * use when the data not being present indicates an error. - */ - WIDGET_HOTKEY_CLIENT_DATA* getExpectedHkClientData( wxTreeListItem aItem ); - /** * Method updateFromClientData * Refresh the visible text on the widget from the rows' client data objects.