diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/subrip_reader.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc index 7412474..73af9ee 100644 --- a/src/subrip_reader.cc +++ b/src/subrip_reader.cc @@ -71,10 +71,14 @@ SubripReader::read (function<optional<string> ()> get_line) CONTENT } state = COUNTER; - RawSubtitle rs; - rs.vertical_position.line = 0; - rs.vertical_position.reference = TOP_OF_SUBTITLE; + auto prepare = [](RawSubtitle& rs) { + rs.vertical_position.line = 0; + rs.vertical_position.reference = TOP_OF_SUBTITLE; + }; + + RawSubtitle rs; + prepare(rs); while (true) { auto line = get_line (); |
