pass wxStrings directly to wxFAIL_MSG, there is no need to use c_str()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-05-22 01:38:40 +00:00
parent 2b232d202a
commit 767e083562
2 changed files with 3 additions and 10 deletions

View File

@@ -10268,10 +10268,7 @@ wxGridCellEditor * wxGrid::GetDefaultEditorForType(const wxString& typeName) con
int index = m_typeRegistry->FindOrCloneDataType(typeName);
if ( index == wxNOT_FOUND )
{
wxString errStr;
errStr.Printf(wxT("Unknown data type name [%s]"), typeName.c_str());
wxFAIL_MSG(errStr.c_str());
wxFAIL_MSG(wxString::Format(wxT("Unknown data type name [%s]"), typeName.c_str()));
return NULL;
}
@@ -10284,10 +10281,7 @@ wxGridCellRenderer * wxGrid::GetDefaultRendererForType(const wxString& typeName)
int index = m_typeRegistry->FindOrCloneDataType(typeName);
if ( index == wxNOT_FOUND )
{
wxString errStr;
errStr.Printf(wxT("Unknown data type name [%s]"), typeName.c_str());
wxFAIL_MSG(errStr.c_str());
wxFAIL_MSG(wxString::Format(wxT("Unknown data type name [%s]"), typeName.c_str()));
return NULL;
}

View File

@@ -1594,8 +1594,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
}
else
{
wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err );
wxFAIL_MSG( errMsg.c_str() );
wxFAIL_MSG( wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err ) );
}
return (err == noErr);