Unix compilation fixes after last commit

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-04-01 13:38:28 +00:00
parent adf5d5935b
commit 22886fb3c3
2 changed files with 7 additions and 8 deletions

View File

@ -134,9 +134,10 @@ public:
} }
private: private:
virtual wxCharBuffer GetMBNul(size_t *nulLen) const virtual const char *GetMBNul(size_t *nulLen) const
{ {
return m_conv->GetMBNul(nulLen); // cast needed to call a private function
return ((wxConvBrokenFileNames *)m_conv)->GetMBNul(nulLen);
} }

View File

@ -214,11 +214,9 @@ wxMBConv::cMB2WC(const char *in, size_t inLen, size_t *outLen) const
// not the most efficient algorithm but it shouldn't matter as normally // not the most efficient algorithm but it shouldn't matter as normally
// there are not many NULs in the string and so normally memcmp() // there are not many NULs in the string and so normally memcmp()
// should stop on the first character // should stop on the first character
for ( const char *p = in; ; p++ ) const char *p = in;
{ while ( memcmp(p, nul, nulLen) != 0 )
if ( memcmp(p, nul, nulLen) == 0 ) p++;
break;
}
inLen = p - in + nulLen; inLen = p - in + nulLen;
} }
@ -1658,7 +1656,7 @@ const char *wxMBConv_iconv::GetMBNul(size_t *nulLen) const
size_t inLen = 1, size_t inLen = 1,
outLen = WXSIZEOF(m_nulBuf); outLen = WXSIZEOF(m_nulBuf);
self->m_nulLen = iconv(w2m, ICONV_CHAR_CAST(L""), &inLen, self->m_nulLen = iconv(w2m, ICONV_CHAR_CAST(L""), &inLen,
&self->m_nulBuf, &outLen); (char **)&self->m_nulBuf, &outLen);
} }
*nulLen = m_nulLen; *nulLen = m_nulLen;