projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9b92e59
)
Switch some list -> vector for consistency.
author
Carl Hetherington
<cth@carlh.net>
Tue, 31 May 2022 19:02:42 +0000
(21:02 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 7 Jun 2022 15:01:06 +0000
(17:01 +0200)
src/lib/content_text.h
patch
|
blob
|
history
src/lib/dcp_decoder.cc
patch
|
blob
|
history
src/lib/dcp_subtitle_decoder.cc
patch
|
blob
|
history
src/lib/text_decoder.cc
patch
|
blob
|
history
src/lib/text_decoder.h
patch
|
blob
|
history
diff --git
a/src/lib/content_text.h
b/src/lib/content_text.h
index d32e880eedac9f25cd5e50e16620e16e4c41be04..cd9d34bf90bce7de028a930b63d15e5316b6d830 100644
(file)
--- a/
src/lib/content_text.h
+++ b/
src/lib/content_text.h
@@
-28,7
+28,7
@@
#include "rect.h"
#include "types.h"
#include <dcp/subtitle_string.h>
#include "rect.h"
#include "types.h"
#include <dcp/subtitle_string.h>
-#include <
list
>
+#include <
vector
>
class Image;
class Image;
@@
-74,12
+74,12
@@
public:
class ContentStringText : public ContentText
{
public:
class ContentStringText : public ContentText
{
public:
- ContentStringText (dcpomatic::ContentTime f, std::
list
<dcp::SubtitleString> s)
+ ContentStringText (dcpomatic::ContentTime f, std::
vector
<dcp::SubtitleString> s)
: ContentText (f)
, subs (s)
{}
: ContentText (f)
, subs (s)
{}
- std::
list
<dcp::SubtitleString> subs;
+ std::
vector
<dcp::SubtitleString> subs;
};
};
diff --git
a/src/lib/dcp_decoder.cc
b/src/lib/dcp_decoder.cc
index 542a8ff7c3a66f70db4737c4a44f71da28b0f47c..dfbef340601df21687144754d354e4539b33f1e6 100644
(file)
--- a/
src/lib/dcp_decoder.cc
+++ b/
src/lib/dcp_decoder.cc
@@
-288,7
+288,7
@@
DCPDecoder::pass_texts (
true
);
true
);
-
list
<dcp::SubtitleString> strings;
+
vector
<dcp::SubtitleString> strings;
for (auto i: subs) {
auto is = dynamic_pointer_cast<const dcp::SubtitleString>(i);
for (auto i: subs) {
auto is = dynamic_pointer_cast<const dcp::SubtitleString>(i);
diff --git
a/src/lib/dcp_subtitle_decoder.cc
b/src/lib/dcp_subtitle_decoder.cc
index d5cbabf1b51d5e65f652638a8518adbd3d2859de..940c8c75a3c6c2513dbe2b98fddb5f29f5fc54b1 100644
(file)
--- a/
src/lib/dcp_subtitle_decoder.cc
+++ b/
src/lib/dcp_subtitle_decoder.cc
@@
-118,8
+118,8
@@
DCPSubtitleDecoder::pass ()
time of emitting the first.
*/
time of emitting the first.
*/
-
list
<dcp::SubtitleString> s;
-
list
<dcp::SubtitleImage> i;
+
vector
<dcp::SubtitleString> s;
+
vector
<dcp::SubtitleImage> i;
auto const p = content_time_period (*_next);
while (_next != _subtitles.end () && content_time_period (*_next) == p) {
auto const p = content_time_period (*_next);
while (_next != _subtitles.end () && content_time_period (*_next) == p) {
diff --git
a/src/lib/text_decoder.cc
b/src/lib/text_decoder.cc
index d5afb555d6683e84daa13c4fe36cfd53151e3b14..776e39c78d7ed5a171314e69b4c42dfb0b497e15 100644
(file)
--- a/
src/lib/text_decoder.cc
+++ b/
src/lib/text_decoder.cc
@@
-19,22
+19,22
@@
*/
*/
-#include "text_decoder.h"
+#include "compose.hpp"
+#include "log.h"
#include "text_content.h"
#include "text_content.h"
+#include "text_decoder.h"
#include "util.h"
#include "util.h"
-#include "log.h"
-#include "compose.hpp"
#include <sub/subtitle.h>
#include <boost/algorithm/string.hpp>
#include <iostream>
#include <sub/subtitle.h>
#include <boost/algorithm/string.hpp>
#include <iostream>
-using std::list;
using std::cout;
using std::cout;
-using std::string;
-using std::min;
using std::max;
using std::max;
+using std::min;
using std::shared_ptr;
using std::shared_ptr;
+using std::string;
+using std::vector;
using boost::optional;
using namespace dcpomatic;
using boost::optional;
using namespace dcpomatic;
@@
-68,7
+68,7
@@
TextDecoder::emit_bitmap_start (ContentBitmapText const& bitmap)
void
void
-TextDecoder::emit_plain_start (ContentTime from,
list
<dcp::SubtitleString> s)
+TextDecoder::emit_plain_start (ContentTime from,
vector
<dcp::SubtitleString> s)
{
for (auto& i: s) {
/* We must escape some things, otherwise they might confuse our subtitle
{
for (auto& i: s) {
/* We must escape some things, otherwise they might confuse our subtitle
@@
-130,7
+130,7
@@
TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
}
}
}
}
-
list
<dcp::SubtitleString> out;
+
vector
<dcp::SubtitleString> out;
for (auto i: subtitle.lines) {
for (auto j: i.blocks) {
for (auto i: subtitle.lines) {
for (auto j: i.blocks) {
@@
-266,7
+266,7
@@
TextDecoder::emit_stop (ContentTime to)
void
void
-TextDecoder::emit_plain (ContentTimePeriod period,
list
<dcp::SubtitleString> s)
+TextDecoder::emit_plain (ContentTimePeriod period,
vector
<dcp::SubtitleString> s)
{
emit_plain_start (period.from, s);
emit_stop (period.to);
{
emit_plain_start (period.from, s);
emit_stop (period.to);
diff --git
a/src/lib/text_decoder.h
b/src/lib/text_decoder.h
index 96b335de14397ac1c9644ad4feb7dd3e150ee615..607d9e194f95cadef876c147b2b151ce59fbcc3f 100644
(file)
--- a/
src/lib/text_decoder.h
+++ b/
src/lib/text_decoder.h
@@
-54,9
+54,9
@@
public:
void emit_bitmap_start (ContentBitmapText const& bitmap);
void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect);
void emit_bitmap_start (ContentBitmapText const& bitmap);
void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect);
- void emit_plain_start (dcpomatic::ContentTime from, std::
list
<dcp::SubtitleString> s);
+ void emit_plain_start (dcpomatic::ContentTime from, std::
vector
<dcp::SubtitleString> s);
void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle);
void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle);
- void emit_plain (dcpomatic::ContentTimePeriod period, std::
list
<dcp::SubtitleString> s);
+ void emit_plain (dcpomatic::ContentTimePeriod period, std::
vector
<dcp::SubtitleString> s);
void emit_plain (dcpomatic::ContentTimePeriod period, sub::Subtitle const & subtitle);
void emit_stop (dcpomatic::ContentTime to);
void emit_plain (dcpomatic::ContentTimePeriod period, sub::Subtitle const & subtitle);
void emit_stop (dcpomatic::ContentTime to);