summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-08 21:43:47 +0000
committerrubidium <rubidium@openttd.org>2009-09-08 21:43:47 +0000
commit99af06dd30032f688ec2a81fc47ab5b8e356f1bd (patch)
treeeda9ac96f04cd68ad0fe0eccf27e0b3441fe37e8 /src
parentb52f692c2987c182b9d70eb6bcbc3a01a6b0593c (diff)
downloadopenttd-99af06dd30032f688ec2a81fc47ab5b8e356f1bd.tar.xz
(svn r17479) -Fix: silence compile warning that's only triggered when you're using a broken iconv.
Diffstat (limited to 'src')
-rw-r--r--src/os/unix/unix.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp
index ee4388aa5..54d18b8cf 100644
--- a/src/os/unix/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -141,11 +141,10 @@ static const char *GetLocalCode()
#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 @@ static const char *convert_tofrom_fs(iconv_t convd, const char *name)
* 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