From ed7db4de16af9f6a0e17f4469aed22a8f6fa17e0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 28 Jan 2025 17:18:50 +0100 Subject: Put preparation into a lambda. --- src/subrip_reader.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/subrip_reader.cc') diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc index 2d3bda2..7412474 100644 --- a/src/subrip_reader.cc +++ b/src/subrip_reader.cc @@ -100,13 +100,8 @@ SubripReader::read (function ()> get_line) } state = METADATA; - - /* Reset stuff that should not persist across separate subtitles */ - rs.bold = false; - rs.italic = false; - rs.underline = false; - rs.vertical_position.line = 0; - rs.vertical_position.reference = TOP_OF_SUBTITLE; + rs = RawSubtitle{}; + prepare(rs); } break; case METADATA: -- cgit v1.2.3