don't use implicit wxString->char*/wchar_t* conversion, it will not be available in wxUSE_STL build in the future

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-06-10 17:42:41 +00:00
parent 52de37c78f
commit 8650108199
51 changed files with 330 additions and 304 deletions

View File

@@ -1367,14 +1367,15 @@ size_t wxFileTypeImpl::GetAllCommands(wxArrayString *verbs,
bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions)
{
wxString strExtensions = m_manager->GetExtension(m_index[0]);
const wxString strExtensions = m_manager->GetExtension(m_index[0]);
extensions.Empty();
// one extension in the space or comma-delimited list
wxString strExt;
for ( const wxChar *p = strExtensions; /* nothing */; p++ )
wxString::const_iterator end = strExtensions.end();
for ( wxString::const_iterator p = strExtensions.begin(); /* nothing */; ++p )
{
if ( *p == wxT(' ') || *p == wxT(',') || *p == wxT('\0') )
if ( p == end || *p == wxT(' ') || *p == wxT(',') )
{
if ( !strExt.empty() )
{
@@ -1384,7 +1385,7 @@ bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions)
//else: repeated spaces
// (shouldn't happen, but it's not that important if it does happen)
if ( *p == wxT('\0') )
if ( p == end )
break;
}
else if ( *p == wxT('.') )
@@ -2488,8 +2489,7 @@ wxMimeTypesManagerImpl::ProcessOtherMailcapField(MailcapLineData& data,
}
// is this something of the form foo=bar?
const wxChar *pEq = wxStrchr(curField, wxT('='));
if ( pEq != NULL )
if ( curField.find('=') != wxString::npos )
{
// split "LHS = RHS" in 2
wxString lhs = curField.BeforeFirst(wxT('=')),