From 767e0835628a60f8a4c15775f24e997a4ae44dbb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 22 May 2007 01:38:40 +0000 Subject: [PATCH] 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 --- src/generic/grid.cpp | 10 ++-------- src/mac/carbon/toolbar.cpp | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 3601bf69d6..d700d5b2a7 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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; } diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index f7bcdf598c..eb9d222704 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -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); -- 2.45.2