Avoid use of C++11 range-based for loop in wxOSX code

This results in clang -Wc++11-extensions warning if -std=c++1x (for some
value of "x") is not used.
This commit is contained in:
Vadim Zeitlin 2019-04-13 19:42:33 +02:00
parent 755906a431
commit 445e320df2

View File

@ -361,8 +361,11 @@ public :
[m_osxMenu setAutoenablesItems:NO];
wxMenu* menu = GetWXPeer();
for ( auto item : menu->GetMenuItems() )
for ( wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
node;
node = node->GetNext() )
{
const wxMenuItem* const item = node->GetData();
if ( item->IsSubMenu() )
{
wxMenuCocoaImpl* subimpl = dynamic_cast<wxMenuCocoaImpl*>(item->GetSubMenu()->GetPeer());