From e1a23412ac9198622dc30c575ef6b2573d20d185 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Wed, 2 Sep 2009 09:40:52 +0000 Subject: [PATCH] Revert r3461.. on unix iconv requires const char**, however for whatever reason msvc is complaining it can't convert it to char**. I have no idea why someone on windows will have to debug it. Originally committed to SVN as r3466. --- aegisub/src/charset_conv.cpp | 6 +++--- aegisub/src/charset_conv.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aegisub/src/charset_conv.cpp b/aegisub/src/charset_conv.cpp index d5ece2300..c26b6bb5c 100644 --- a/aegisub/src/charset_conv.cpp +++ b/aegisub/src/charset_conv.cpp @@ -131,7 +131,7 @@ size_t AegisubCSConv::GetMBNulLen() const { char outBuff[8]; size_t inLen = sizeof(wchar_t); size_t outLen = sizeof(outBuff); - const char * inPtr = (char *)nulStr; + char * inPtr = (char *)nulStr; char * outPtr = outBuff; size_t res = iconv(w2m, &inPtr, &inLen, &outPtr, &outLen); @@ -211,7 +211,7 @@ size_t AegisubCSConv::FromWChar(char *dst, size_t dstSize, const wchar_t *src, s /// @param srcSize /// @return /// -size_t AegisubCSConv::doConversion(iconv_t cd, char *dst, size_t dstSize, const char *src, size_t srcSize) const { +size_t AegisubCSConv::doConversion(iconv_t cd, char *dst, size_t dstSize, char *src, size_t srcSize) const { if (dstSize > 0) { return iconvWrapper(cd, &src, &srcSize, &dst, &dstSize); } @@ -243,7 +243,7 @@ size_t AegisubCSConv::doConversion(iconv_t cd, char *dst, size_t dstSize, const /// @param outbytesleft /// @return /// -size_t AegisubCSConv::iconvWrapper(iconv_t cd, const char **inbuf, size_t *inbytesleft, +size_t AegisubCSConv::iconvWrapper(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) const { #if wxUSE_THREADS diff --git a/aegisub/src/charset_conv.h b/aegisub/src/charset_conv.h index 02141041b..bacaa9e52 100644 --- a/aegisub/src/charset_conv.h +++ b/aegisub/src/charset_conv.h @@ -106,8 +106,8 @@ private: /// DOCME bool enableSubst; - size_t doConversion(iconv_t cd, char *dst, size_t dstSize, const char *src, size_t srcSize) const; - size_t iconvWrapper(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) const; + size_t doConversion(iconv_t cd, char *dst, size_t dstSize, char *src, size_t srcSize) const; + size_t iconvWrapper(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) const; static void ucToMbFallback( unsigned int code,