From: Vadim Zeitlin Date: Tue, 13 Jul 2010 11:33:09 +0000 (+0000) Subject: Fix wxMotif compilation with g++ 4.4. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f4ad6505dad41a3dee60acd1676cb08fe9a429b3 Fix wxMotif compilation with g++ 4.4. wxMenu::CreateMenu() parameter called "index" was mistakenly wrapped in WXUNUSED() making it invisible inside the function body and the (BSD string function) index() was used instead. This somehow compiled before but not with g++ 4.4. In any case, the code was wrong even when it did compile. Remove WXUNUSED() from the parameter and also rename it to avoid clashes with (semi-)standard function which can also be defined as macro on some systems. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index 65fcead053..5f30a95496 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -446,7 +446,7 @@ void wxMenu::DestroyWidgetAndDetach() WXWidget wxMenu::CreateMenu (wxMenuBar * menuBar, WXWidget parent, wxMenu * topMenu, - size_t WXUNUSED(index), + size_t menuIndex, const wxString& title, bool pullDown) { @@ -493,7 +493,7 @@ WXWidget wxMenu::CreateMenu (wxMenuBar * menuBar, XmNlabelString, label_str(), XmNsubMenuId, menu, (String)wxFont::GetFontTag(), m_font.GetFontTypeC(dpy), - XmNpositionIndex, index, + XmNpositionIndex, menuIndex, NULL); if (mnem != 0)