Don't use some "recent" C++98 features not supported by VC6.

Don't return void values nor redeclare the same variable in for loops to fix
VC6 compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-16 22:38:06 +00:00
parent 496dbbe76e
commit 6ab66823d8
2 changed files with 6 additions and 6 deletions

View File

@@ -138,8 +138,6 @@ void ObjrefDialog::OnNotebookPageChanged( wxNotebookEvent &event )
ClearCalculator(); ClearCalculator();
break; break;
} }
default: return;
} }
} }
@@ -255,7 +253,8 @@ void ObjrefDialog::OnOperatorClick(wxCommandEvent& event)
{ {
wxLogMessage("You clicked operators[%i], XRCID %d, 'Clear'", wxLogMessage("You clicked operators[%i], XRCID %d, 'Clear'",
ID, event.GetId()); ID, event.GetId());
return ClearCalculator(); ClearCalculator();
return;
} }
switch(ID) switch(ID)

View File

@@ -215,7 +215,8 @@ void MenuTestCase::FindInMenu()
CPPUNIT_ASSERT( menuHelp->FindItem("Sub&menu") != wxNOT_FOUND ); CPPUNIT_ASSERT( menuHelp->FindItem("Sub&menu") != wxNOT_FOUND );
// Find by position: // Find by position:
for (size_t n=0; n < menuHelp->GetMenuItemCount(); ++n) size_t n;
for (n=0; n < menuHelp->GetMenuItemCount(); ++n)
{ {
CPPUNIT_ASSERT( menuHelp->FindItemByPosition(n) ); CPPUNIT_ASSERT( menuHelp->FindItemByPosition(n) );
} }
@@ -224,7 +225,7 @@ void MenuTestCase::FindInMenu()
CPPUNIT_ASSERT( menuHelp->FindItem(MenuTestCase_Bar) ); CPPUNIT_ASSERT( menuHelp->FindItem(MenuTestCase_Bar) );
CPPUNIT_ASSERT( menuHelp->FindItem(MenuTestCase_Foo) == NULL ); CPPUNIT_ASSERT( menuHelp->FindItem(MenuTestCase_Foo) == NULL );
for (size_t n=0; n < menuHelp->GetMenuItemCount(); ++n) for (n=0; n < menuHelp->GetMenuItemCount(); ++n)
{ {
size_t locatedAt; size_t locatedAt;
wxMenuItem* itemByPos = menuHelp->FindItemByPosition(n); wxMenuItem* itemByPos = menuHelp->FindItemByPosition(n);
@@ -235,7 +236,7 @@ void MenuTestCase::FindInMenu()
} }
// Find submenu item: // Find submenu item:
for (size_t n=0; n < menuHelp->GetMenuItemCount(); ++n) for (n=0; n < menuHelp->GetMenuItemCount(); ++n)
{ {
wxMenuItem* item = menuHelp->FindItemByPosition(n); wxMenuItem* item = menuHelp->FindItemByPosition(n);
if (item->IsSubMenu()) if (item->IsSubMenu())