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

@@ -30,8 +30,7 @@ TEST(IcuConverter, InvalidCharset)
TEST(IcuConverter, Latin1)
{
IcuConverter *const converter =
IcuConverter::Create("iso-8859-1");
const auto converter = IcuConverter::Create("iso-8859-1");
ASSERT_NE(converter, nullptr);
for (const auto i : invalid_utf8) {
@@ -45,8 +44,6 @@ TEST(IcuConverter, Latin1)
auto t = converter->ToUTF8(i.other);
EXPECT_STREQ(t.c_str(), i.utf8);
}
delete converter;
}
#endif