From 38a5ff713757b9dc0cb67cb09613182c46dc9657 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 30 May 2014 10:53:53 +0100 Subject: Split up into RawSubtitle and Subtitle, with collect(). Hopefully cleaner. --- src/stl_binary_reader.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/stl_binary_reader.cc') diff --git a/src/stl_binary_reader.cc b/src/stl_binary_reader.cc index b0701b5..6c02526 100644 --- a/src/stl_binary_reader.cc +++ b/src/stl_binary_reader.cc @@ -104,7 +104,7 @@ STLBinaryReader::STLBinaryReader (istream& in) split (lines, whole, is_any_of ("\x8a")); for (size_t i = 0; i < lines.size(); ++i) { - Subtitle sub; + RawSubtitle sub; sub.from.set_frame (get_timecode (5)); sub.to.set_frame (get_timecode (9)); sub.vertical_position.line = get_int (13, 1) + i; @@ -117,10 +117,7 @@ STLBinaryReader::STLBinaryReader (istream& in) lines[i] = lines[i].substr (0, unused); } - Block block; - block.text = utf_to_utf (iso6937_to_utf16 (lines[i].c_str())); - sub.blocks.push_back (block); - + sub.text = utf_to_utf (iso6937_to_utf16 (lines[i].c_str())); _subs.push_back (sub); } } -- cgit v1.2.3