wxDFB wxUSE_STL compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-06-25 13:55:06 +00:00
parent 9ec6078f41
commit 9580fdc3b1
3 changed files with 21 additions and 14 deletions

View File

@@ -93,17 +93,19 @@ int wxControl::FindAccelIndex(const wxString& label, wxString *labelOnly)
}
int indexAccel = -1;
for ( const wxChar *pc = label; *pc != wxT('\0'); pc++ )
for ( wxString::const_iterator pc = label.begin(); pc != label.end(); ++pc )
{
if ( *pc == MNEMONIC_PREFIX )
{
pc++; // skip it
if ( *pc != MNEMONIC_PREFIX )
++pc; // skip it
if ( pc == label.end() )
break;
else if ( *pc != MNEMONIC_PREFIX )
{
if ( indexAccel == -1 )
{
// remember it (-1 is for MNEMONIC_PREFIX itself
indexAccel = pc - label.c_str() - 1;
indexAccel = pc - label.begin() - 1;
}
else
{