summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-01 20:24:23 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-01 20:24:23 +0200
commited2e01b1fa3db602a3f98312581e6ebac47dac15 (patch)
tree06f44f1ca1c2d752b232bf34c50a3041bd04cdee
parent197a6288334e13c547d7a74bb47960345a6f4189 (diff)
White space: string_text_file_decoder.{cc,h}
-rw-r--r--src/lib/string_text_file_decoder.cc36
-rw-r--r--src/lib/string_text_file_decoder.h8
2 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/string_text_file_decoder.cc b/src/lib/string_text_file_decoder.cc
index 585d68888..05768b304 100644
--- a/src/lib/string_text_file_decoder.cc
+++ b/src/lib/string_text_file_decoder.cc
@@ -35,31 +35,31 @@ using std::vector;
using namespace dcpomatic;
-StringTextFileDecoder::StringTextFileDecoder (shared_ptr<const Film> film, shared_ptr<const StringTextFileContent> content)
- : Decoder (film)
- , StringTextFile (content)
- , _next (0)
+StringTextFileDecoder::StringTextFileDecoder(shared_ptr<const Film> film, shared_ptr<const StringTextFileContent> content)
+ : Decoder(film)
+ , StringTextFile(content)
+ , _next(0)
{
- text.push_back (make_shared<TextDecoder>(this, content->only_text()));
+ text.push_back(make_shared<TextDecoder>(this, content->only_text()));
update_position();
}
void
-StringTextFileDecoder::seek (ContentTime time, bool accurate)
+StringTextFileDecoder::seek(ContentTime time, bool accurate)
{
/* It's worth back-tracking a little here as decoding is cheap and it's nice if we don't miss
too many subtitles when seeking.
*/
- time -= ContentTime::from_seconds (5);
+ time -= ContentTime::from_seconds(5);
if (time < ContentTime()) {
time = ContentTime();
}
- Decoder::seek (time, accurate);
+ Decoder::seek(time, accurate);
_next = 0;
- while (_next < _subtitles.size() && ContentTime::from_seconds (_subtitles[_next].from.all_as_seconds ()) < time) {
+ while (_next < _subtitles.size() && ContentTime::from_seconds(_subtitles[_next].from.all_as_seconds()) < time) {
++_next;
}
@@ -68,14 +68,14 @@ StringTextFileDecoder::seek (ContentTime time, bool accurate)
bool
-StringTextFileDecoder::pass ()
+StringTextFileDecoder::pass()
{
- if (_next >= _subtitles.size ()) {
+ if (_next >= _subtitles.size()) {
return true;
}
- ContentTimePeriod const p = content_time_period (_subtitles[_next]);
- only_text()->emit_plain (p, _subtitles[_next]);
+ ContentTimePeriod const p = content_time_period(_subtitles[_next]);
+ only_text()->emit_plain(p, _subtitles[_next]);
++_next;
@@ -86,17 +86,17 @@ StringTextFileDecoder::pass ()
ContentTimePeriod
-StringTextFileDecoder::content_time_period (sub::Subtitle s) const
+StringTextFileDecoder::content_time_period(sub::Subtitle s) const
{
- return ContentTimePeriod (
- ContentTime::from_seconds (s.from.all_as_seconds()),
- ContentTime::from_seconds (s.to.all_as_seconds())
+ return ContentTimePeriod(
+ ContentTime::from_seconds(s.from.all_as_seconds()),
+ ContentTime::from_seconds(s.to.all_as_seconds())
);
}
void
-StringTextFileDecoder::update_position ()
+StringTextFileDecoder::update_position()
{
if (_next < _subtitles.size()) {
only_text()->maybe_set_position(
diff --git a/src/lib/string_text_file_decoder.h b/src/lib/string_text_file_decoder.h
index c58021acb..3b43d61d3 100644
--- a/src/lib/string_text_file_decoder.h
+++ b/src/lib/string_text_file_decoder.h
@@ -29,13 +29,13 @@ class StringTextFileContent;
class StringTextFileDecoder : public Decoder, public StringTextFile
{
public:
- StringTextFileDecoder (std::shared_ptr<const Film> film, std::shared_ptr<const StringTextFileContent>);
+ StringTextFileDecoder(std::shared_ptr<const Film> film, std::shared_ptr<const StringTextFileContent>);
- void seek (dcpomatic::ContentTime time, bool accurate) override;
- bool pass () override;
+ void seek(dcpomatic::ContentTime time, bool accurate) override;
+ bool pass() override;
private:
- dcpomatic::ContentTimePeriod content_time_period (sub::Subtitle s) const;
+ dcpomatic::ContentTimePeriod content_time_period(sub::Subtitle s) const;
void update_position();
size_t _next;