summaryrefslogtreecommitdiff
path: root/src/ssa_reader.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-07-10 02:05:56 +0200
committerCarl Hetherington <cth@carlh.net>2021-07-10 02:05:56 +0200
commitf9c3bb397743e2556b55f8f6433aec8e731a81e8 (patch)
tree261ef68758b7c208577fa442df431ca2c9d1e9ba /src/ssa_reader.cc
parent8115d0f378b4c52a2ffca86ef8cfd949e9272d87 (diff)
Use dcp::compose rather than our own.compose
Diffstat (limited to 'src/ssa_reader.cc')
-rw-r--r--src/ssa_reader.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ssa_reader.cc b/src/ssa_reader.cc
index 4a9be0e..b6839fe 100644
--- a/src/ssa_reader.cc
+++ b/src/ssa_reader.cc
@@ -22,7 +22,7 @@
#include "sub_assert.h"
#include "raw_convert.h"
#include "subtitle.h"
-#include "compose.hpp"
+#include <dcp/compose.h>
#include <boost/algorithm/string.hpp>
#include <boost/bind.hpp>
#include <iostream>
@@ -54,13 +54,13 @@ h_colour (string s)
{
/* There are both BGR and ABGR versions of these colours */
if ((s.length() != 8 && s.length() != 10) || s[0] != '&' || s[1] != 'H') {
- throw SSAError(String::compose("Badly formatted colour tag %1", s));
+ throw SSAError(dcp::compose("Badly formatted colour tag %1", s));
}
int ir, ig, ib;
/* XXX: ignoring alpha channel here; note that 00 is opaque and FF is transparent */
int const off = s.length() == 10 ? 4 : 2;
if (sscanf(s.c_str() + off, "%2x%2x%2x", &ib, &ig, &ir) < 3) {
- throw SSAError(String::compose("Badly formatted colour tag %1", s));
+ throw SSAError(dcp::compose("Badly formatted colour tag %1", s));
}
return sub::Colour(ir / 255.0, ig / 255.0, ib / 255.0);
}
@@ -253,7 +253,7 @@ SSAReader::parse_style (RawSubtitle& sub, string style, int play_res_x, int play
} else if (boost::starts_with(style, "\\c")) {
/* \c&Hbbggrr& */
if (style.length() <= 2) {
- throw SSAError(String::compose("Badly formatted colour tag %1", style));
+ throw SSAError(dcp::compose("Badly formatted colour tag %1", style));
}
sub.colour = h_colour (style.substr(2, style.length() - 3));
}