From 526715ef11b35258737e7c367cec760a1dbd5047 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 25 Sep 2015 15:47:02 +0100 Subject: [PATCH] Try to fix Windows build. --- src/lib/subrip.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/subrip.cc b/src/lib/subrip.cc index 6df8b236b..a707d1f9f 100644 --- a/src/lib/subrip.cc +++ b/src/lib/subrip.cc @@ -50,12 +50,16 @@ SubRip::SubRip (shared_ptr content) UConverter* to_utf16 = ucnv_open (in_charset, &status); /* This is a guess; I think we should be able to encode any input in 4 times its input size */ scoped_array utf16 (new uint16_t[in.size() * 2]); - int const utf16_len = ucnv_toUChars (to_utf16, utf16.get(), in.size() * 2, reinterpret_cast (in.data().get()), in.size(), &status); + int const utf16_len = ucnv_toUChars ( + to_utf16, reinterpret_cast(utf16.get()), in.size() * 2, + reinterpret_cast (in.data().get()), in.size(), + &status + ); UConverter* to_utf8 = ucnv_open ("UTF-8", &status); /* Another guess */ scoped_array utf8 (new char[utf16_len * 2]); - ucnv_fromUChars (to_utf8, utf8.get(), utf16_len * 2, utf16.get(), utf16_len, &status); + ucnv_fromUChars (to_utf8, utf8.get(), utf16_len * 2, reinterpret_cast(utf16.get()), utf16_len, &status); ucsdet_close (detector); ucnv_close (to_utf16); -- 2.30.2