X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a380af4dbff98b71780c32772625f1d974522e4e..64f4500a4a6905623685e67efc65b0d856aff393:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 094271d0f7..4cca372c62 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -310,9 +310,9 @@ void wxMenuBase::AddSubMenu(wxMenu *submenu) submenu->SetParent((wxMenu *)this); } -bool wxMenuBase::DoAppend(wxMenuItem *item) +wxMenuItem* wxMenuBase::DoAppend(wxMenuItem *item) { - wxCHECK_MSG( item, FALSE, wxT("invalid item in wxMenu::Append()") ); + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Append()") ); m_items.Append(item); item->SetMenu((wxMenu*)this); @@ -321,12 +321,12 @@ bool wxMenuBase::DoAppend(wxMenuItem *item) AddSubMenu(item->GetSubMenu()); } - return TRUE; + return item; } -bool wxMenuBase::Insert(size_t pos, wxMenuItem *item) +wxMenuItem* wxMenuBase::Insert(size_t pos, wxMenuItem *item) { - wxCHECK_MSG( item, FALSE, wxT("invalid item in wxMenu::Insert") ); + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Insert") ); if ( pos == GetMenuItemCount() ) { @@ -341,9 +341,9 @@ bool wxMenuBase::Insert(size_t pos, wxMenuItem *item) } } -bool wxMenuBase::DoInsert(size_t pos, wxMenuItem *item) +wxMenuItem* wxMenuBase::DoInsert(size_t pos, wxMenuItem *item) { - wxCHECK_MSG( item, FALSE, wxT("invalid item in wxMenu::Insert()") ); + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Insert()") ); wxMenuItemList::compatibility_iterator node = m_items.Item(pos); wxCHECK_MSG( node, FALSE, wxT("invalid index in wxMenu::Insert()") ); @@ -355,7 +355,7 @@ bool wxMenuBase::DoInsert(size_t pos, wxMenuItem *item) AddSubMenu(item->GetSubMenu()); } - return TRUE; + return item; } wxMenuItem *wxMenuBase::Remove(wxMenuItem *item)