lib/icu/Util: fold UCharToUTF8Throw() into UCharToUTF8()

This commit is contained in:
Max Kellermann
2016-04-21 10:58:21 +02:00
parent b9f535cd49
commit 423cd5900e
3 changed files with 4 additions and 30 deletions

View File

@@ -100,7 +100,7 @@ DoConvert(iconv_t conv, const char *src)
AllocatedString<char>
IcuConverter::ToUTF8(const char *s) const
{
try {
#ifdef HAVE_ICU
const ScopeLock protect(mutex);
@@ -123,6 +123,8 @@ IcuConverter::ToUTF8(const char *s) const
#elif defined(HAVE_ICONV)
return DoConvert(to_utf8, s);
#endif
} catch (const std::runtime_error &) {
return nullptr;
}
AllocatedString<char>