Compile bug for unsuitable method in MB2WC and WX2MB procs. VA only

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-03-27 18:34:35 +00:00
parent b328857cfb
commit 5ab57de77d

View File

@@ -64,27 +64,27 @@ size_t wxMBConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
const wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const
{
if (psz)
if (psz)
{
size_t nLen = MB2WC((wchar_t *) NULL, psz, 0);
wxWCharBuffer buf(nLen);
MB2WC((wchar_t *)(const wchar_t *) buf, psz, nLen);
return buf;
}
else
}
else
return wxWCharBuffer((wchar_t *) NULL);
}
const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *psz) const
{
if (psz)
if (psz)
{
size_t nLen = WC2MB((char *) NULL, psz, 0);
wxCharBuffer buf(nLen);
WC2MB((char *)(const char *) buf, psz, nLen);
return buf;
}
else
}
else
return wxCharBuffer((char *) NULL);
}
@@ -321,7 +321,11 @@ size_t wxCSConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
((wxCSConv *)this)->LoadNow(); // discard constness
if (buf) {
if (m_cset) {
#if defined(__VISAGECPP__)
m_cset->m2w.Convert(psz, (wxChar*)buf);
#else
m_cset->m2w.Convert(psz, buf);
#endif
} else {
// latin-1 (direct)
for (size_t c=0; c<n; c++)
@@ -337,7 +341,11 @@ size_t wxCSConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
((wxCSConv *)this)->LoadNow(); // discard constness
if (buf) {
if (m_cset) {
#if defined(__VISAGECPP__)
m_cset->w2m.Convert((wxChar*)psz, buf);
#else
m_cset->w2m.Convert(psz, buf);
#endif
} else {
// latin-1 (direct)
for (size_t c=0; c<n; c++)