X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41efa9a7cb85bec4aefa6aa9324d2d0b45bfc3d3..64f4500a4a6905623685e67efc65b0d856aff393:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 60dfd05bdb..4cca372c62 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -131,7 +131,7 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) current.clear(); } else { - current += wxTolower(label[n]); + current += (wxChar) wxTolower(label[n]); } } @@ -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)