X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fsubrip_reader.cc;h=8ba7c7ddc51f08f2434541d3d07d9fc6fffd129b;hb=ceb9ad4b9a6611da0e49e7c3f808dba5e794cec3;hp=beb81e1c41db1cbaefbbd358a574161128f412a2;hpb=013f6aab443f5b7857871b6f0b6b41f7562bc870;p=libsub.git diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc index beb81e1..8ba7c7d 100644 --- a/src/subrip_reader.cc +++ b/src/subrip_reader.cc @@ -37,7 +37,6 @@ using std::string; using std::vector; -using std::list; using std::cout; using std::hex; using boost::lexical_cast; @@ -74,7 +73,7 @@ SubripReader::read (function ()> get_line) rs.vertical_position.reference = TOP_OF_SUBTITLE; while (true) { - optional line = get_line (); + auto line = get_line (); if (!line) { break; } @@ -198,7 +197,7 @@ SubripReader::convert_line (string t, RawSubtitle& p) string tag; - list colours; + vector colours; colours.push_back (Colour (1, 1, 1)); /* XXX: missing support */ @@ -237,7 +236,7 @@ SubripReader::convert_line (string t, RawSubtitle& p) p.underline = false; } else if (boost::starts_with (tag, "font")) { maybe_content (p); - boost::regex re (".*color=\"#([[:xdigit:]]+)\""); + boost::regex re (".*color=\"?#([[:xdigit:]]+)\"?"); boost::smatch match; if (boost::regex_search (tag, match, re) && string (match[1]).size() == 6) { p.colour = Colour::from_rgb_hex (match[1]);