From 6a0da7e4b9f5da2e52fa503e3ac4e07f86ef7589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 16 Apr 2007 11:04:35 +0000 Subject: [PATCH] added wxMBConv argument to char_str() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/wxstring.tex | 2 +- include/wx/string.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex index c74bfb6884..b8c3091f56 100644 --- a/docs/latex/wx/wxstring.tex +++ b/docs/latex/wx/wxstring.tex @@ -587,7 +587,7 @@ to a function expecting non-const pointer. \membersection{wxString::char\_str}\label{wxstringcharstr} -\constfunc{wxWritableCharBuffer}{char\_str}{\void} +\constfunc{wxWritableCharBuffer}{char\_str}{\param{wxMBConv\&}{ conv = wxConvLibc}} Returns an object with string data that is implicitly convertible to {\tt char*} pointer. Note that any change to the returned buffer is lost and so diff --git a/include/wx/string.h b/include/wx/string.h index eb11c399a3..0455a59df1 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -839,7 +839,8 @@ public: // conversion to *non-const* multibyte or widestring buffer; modifying // returned buffer won't affect the string, these methods are only useful // for passing values to const-incorrect functions - wxWritableCharBuffer char_str() const { return mb_str(wxConvLibc); } + wxWritableCharBuffer char_str(const wxMBConv& conv = wxConvLibc) const + { return mb_str(conv); } #if wxUSE_WCHAR_T wxWritableWCharBuffer wchar_str() const { return wc_str(wxConvLibc); } #endif