fix compilation with mingw iconv

The parameter there is const. Use the appropriate macro.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2022-08-07 14:47:41 -07:00
parent 2c5e1d8cac
commit 2b8ca5a9d7

View File

@ -1576,7 +1576,11 @@ bool convertStringCharsetIconv(std::string& str, const char* from, const char* t
return false;
}
std::string outstr;
#ifdef WINICONV_CONST
auto inptr = (WINICONV_CONST char*)(str.c_str());
#else
auto inptr = const_cast<char*>(str.c_str());
#endif
size_t inbytesleft = str.length();
while (inbytesleft) {
char outbuf[256];