From: Vadim Zeitlin Date: Tue, 23 Aug 2005 23:27:40 +0000 (+0000) Subject: use wxString::Format(), calling string.Format() has no effect patch 1267345) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/30962327c9d5a850d9dc00864b1ffb448a832e6f use wxString::Format(), calling string.Format() has no effect patch 1267345) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 9ba20471a8..0976db30ff 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -530,8 +530,7 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons OSStatus err = 0; #if wxMAC_USE_NATIVE_TOOLBAR - wxString labelStr; - labelStr.Format(wxT("%xd"), (int)this); + wxString labelStr = wxString::Format(wxT("%xd"), (int)this); err = HIToolbarCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding() ) , 0 , (HIToolbarRef*) &m_macHIToolbarRef ); @@ -1087,8 +1086,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), #if wxMAC_USE_NATIVE_TOOLBAR HIToolbarItemRef item ; - wxString labelStr; - labelStr.Format(wxT("%xd"), (int)tool); + wxString labelStr = wxString::Format(wxT("%xd"), (int)tool); err = HIToolbarItemCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()), kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates, &item ); @@ -1120,8 +1118,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), // FIXME: doesn't work yet... { HIToolbarItemRef item; - wxString labelStr; - labelStr.Format( wxT("%xd"), (int) tool ); + wxString labelStr = wxString::Format( wxT("%xd"), (int) tool ); result = HIToolbarItemCreate( wxMacCFStringHolder(labelStr, wxFont::GetDefaultEncoding()), kHIToolbarItemCantBeRemoved | kHIToolbarItemAnchoredLeft | kHIToolbarItemAllowDuplicates, &item ); @@ -1173,8 +1170,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), } else { - wxString errMsg; - errMsg.Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long) err ); + wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long) err ); wxASSERT_MSG( false, errMsg.c_str() ); }