Improved conversion constructor arrangement to always allow a second

wxMBConv-type argument (changes the signature of the non-Unicode
create-from-wchar_t constructor).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven
2000-03-25 22:56:20 +00:00
parent c6f724133d
commit 8fac236758
2 changed files with 6 additions and 7 deletions

View File

@@ -341,15 +341,15 @@ wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength)
#if wxUSE_WCHAR_T
// from wide string
wxString::wxString(const wchar_t *pwz)
wxString::wxString(const wchar_t *pwz, wxMBConv& conv)
{
// first get necessary size
size_t nLen = pwz ? wxWC2MB((char *) NULL, pwz, 0) : 0;
size_t nLen = pwz ? conv.WC2MB((char *) NULL, pwz, 0) : 0;
// empty?
if ( (nLen != 0) && (nLen != (size_t)-1) ) {
AllocBuffer(nLen);
wxWC2MB(m_pchData, pwz, nLen);
conv.WC2MB(m_pchData, pwz, nLen);
}
else {
Init();