Mercurial > hg > openttd
changeset 12985:1ace9b729b65 draft
(svn r17479) -Fix: silence compile warning that's only triggered when you're using a broken iconv.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 08 Sep 2009 21:43:47 +0000 |
parents | 9e639584b663 |
children | ac5dc29676bc |
files | src/os/unix/unix.cpp |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -141,11 +141,10 @@ #endif } -/** FYI: This is not thread-safe. - * convert between locales, which from and which to is set in the calling - * functions OTTD2FS() and FS2OTTD(). You should NOT use this function directly - * NOTE: iconv was added in OSX 10.3. 10.2.x will still have the invalid char - * issues. There aren't any easy fix for this */ +/** + * Convert between locales, which from and which to is set in the calling + * functions OTTD2FS() and FS2OTTD(). + */ static const char *convert_tofrom_fs(iconv_t convd, const char *name) { static char buf[1024]; @@ -153,7 +152,7 @@ * non-const. Correct implementation is at * http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html */ #ifdef HAVE_BROKEN_ICONV - char *inbuf = (char*)name; + char *inbuf = const_cast<char*>(name); #else const char *inbuf = name; #endif