summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/unicode.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-08-12 20:50:37 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-08-12 21:42:32 +0200
commitc2909728339259e5a946b36cf3b53c22d49ec9e6 (patch)
treebfca1aec8550ffed779957ee05008a8d8982b29e /crawl-ref/source/unicode.cc
parent42a4e95396d9ad1ddcd4c167eafda2a986ef918b (diff)
downloadcrawl-ref-c2909728339259e5a946b36cf3b53c22d49ec9e6.tar.gz
crawl-ref-c2909728339259e5a946b36cf3b53c22d49ec9e6.zip
Don't pointlessly define utf8_to_16() on non-Windows.
While it's not much code by itself, instantiating std::wstring templates is.
Diffstat (limited to 'crawl-ref/source/unicode.cc')
-rw-r--r--crawl-ref/source/unicode.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/unicode.cc b/crawl-ref/source/unicode.cc
index 1d83f65edd..461c41e4fc 100644
--- a/crawl-ref/source/unicode.cc
+++ b/crawl-ref/source/unicode.cc
@@ -113,6 +113,8 @@ int utf8towc(ucs_t *d, const char *s)
return cnt;
}
+#ifdef TARGET_OS_WINDOWS
+// don't pull in wstring templates on other systems
std::wstring utf8_to_16(const char *s)
{
std::wstring d;
@@ -132,6 +134,7 @@ std::wstring utf8_to_16(const char *s)
}
return d;
}
+#endif
std::string utf16_to_8(const wchar_t *s)
{