lib/icu/Converter: Create() returns std::unique_ptr

This commit is contained in:
Max Kellermann
2019-11-04 15:44:06 +01:00
parent 496f43e25d
commit ed327c597a
6 changed files with 11 additions and 16 deletions

View File

@@ -456,10 +456,7 @@ Windows1252ToUTF8(const char *s) noexcept
{
#ifdef HAVE_ICU_CONVERTER
try {
std::unique_ptr<IcuConverter>
converter(IcuConverter::Create("windows-1252"));
return converter->ToUTF8(s);
return IcuConverter::Create("windows-1252")->ToUTF8(s);
} catch (...) { }
#endif