summaryrefslogtreecommitdiff
path: root/src/lib/text_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-04 21:32:13 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-07 23:27:56 +0100
commita5d004b0773f633401528392fc28e66d70e13ac8 (patch)
tree9f83ff2ab353f5a63918210d4930d0ead228375e /src/lib/text_content.cc
parentdd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (diff)
BOOST_FOREACH.
Diffstat (limited to 'src/lib/text_content.cc')
-rw-r--r--src/lib/text_content.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc
index 656aec7eb..2f01bb2fa 100644
--- a/src/lib/text_content.cc
+++ b/src/lib/text_content.cc
@@ -26,7 +26,6 @@
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
#include <iostream>
#include "i18n.h"
@@ -105,7 +104,7 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
}
list<shared_ptr<TextContent> > c;
- BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Text")) {
+ for (auto i: node->node_children("Text")) {
c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));
}
@@ -397,7 +396,7 @@ TextContent::identifier () const
/* XXX: I suppose really _fonts shouldn't be in here, since not all
types of subtitle content involve fonts.
*/
- BOOST_FOREACH (shared_ptr<Font> f, _fonts) {
+ for (auto f: _fonts) {
s += "_" + f->file().get_value_or("Default").string();
}
@@ -416,13 +415,13 @@ TextContent::add_font (shared_ptr<Font> font)
void
TextContent::connect_to_fonts ()
{
- BOOST_FOREACH (boost::signals2::connection& i, _font_connections) {
+ for (auto const& i: _font_connections) {
i.disconnect ();
}
_font_connections.clear ();
- BOOST_FOREACH (shared_ptr<Font> i, _fonts) {
+ for (auto i: _fonts) {
_font_connections.push_back (i->Changed.connect (boost::bind (&TextContent::font_changed, this)));
}
}