/*
- Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#include "cinema.h"
#include "screen.h"
#include "dcpomatic_assert.h"
#include <libxml++/libxml++.h>
#include <iostream>
+
using std::list;
using std::string;
using std::shared_ptr;
+using std::make_shared;
using dcp::raw_convert;
using dcpomatic::Screen;
+
Cinema::Cinema (cxml::ConstNodePtr node)
: name (node->string_child ("Name"))
, notes (node->optional_string_child("Notes").get_value_or(""))
void
Cinema::read_screens (cxml::ConstNodePtr node)
{
- list<cxml::NodePtr> s = node->node_children ("Screen");
- for (list<cxml::NodePtr>::iterator i = s.begin(); i != s.end(); ++i) {
- add_screen (shared_ptr<Screen> (new Screen (*i)));
+ for (auto i: node->node_children("Screen")) {
+ add_screen (make_shared<Screen>(i));
}
}