diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-08-12 20:08:25 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-08-12 21:42:32 +0200 |
commit | 42a4e95396d9ad1ddcd4c167eafda2a986ef918b (patch) | |
tree | 01180c67428d295a2931eb12007c3f2068963854 /crawl-ref/source/unicode.cc | |
parent | 225e6d958a48e143a8a75632cbb8715c5fbdc121 (diff) | |
download | crawl-ref-42a4e95396d9ad1ddcd4c167eafda2a986ef918b.tar.gz crawl-ref-42a4e95396d9ad1ddcd4c167eafda2a986ef918b.zip |
Death to std::wstringstream!
There's no point in accumulating a string of wchar_t and then immediately
converting it to utf8 if we can accumulate it in utf8. This solves problems
on Windows and Android (neither of whom can run webtiles servers currently)
and reduces the code size somewhat.
Diffstat (limited to 'crawl-ref/source/unicode.cc')
-rw-r--r-- | crawl-ref/source/unicode.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/crawl-ref/source/unicode.cc b/crawl-ref/source/unicode.cc index 357ec1dfb1..1d83f65edd 100644 --- a/crawl-ref/source/unicode.cc +++ b/crawl-ref/source/unicode.cc @@ -233,23 +233,6 @@ static std::string utf8_validate(const char *s) return d; } -#ifdef USE_TILE_WEB -std::string wcstoutf8(const std::wstring &s) -{ - std::string out; - - for (size_t j = 0; j < s.length(); j++) - { - char buf[4]; - int r = wctoutf8(buf, s[j]); - for (int i = 0; i < r; i++) - out.push_back(buf[i]); - } - - return out; -} -#endif - static bool _check_trail(FILE *f, const char* bytes, int len) { while (len--) |