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
This commit is contained in:
Vadim Zeitlin
2010-07-13 11:33:09 +00:00
parent c82f9bcf7f
commit f4ad6505da

View File

@@ -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)