X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fcinema.cc;h=936517a4039b100630b3ddf1020efe719d57f3c2;hp=42557efc3135c4614fdb1dfbec294b61c71941b4;hb=e46302d86c7295bd95cd7cdfa331c8186fe793cb;hpb=a5d004b0773f633401528392fc28e66d70e13ac8 diff --git a/src/lib/cinema.cc b/src/lib/cinema.cc index 42557efc3..936517a40 100644 --- a/src/lib/cinema.cc +++ b/src/lib/cinema.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,20 +18,23 @@ */ + #include "cinema.h" #include "screen.h" #include "dcpomatic_assert.h" #include #include #include -#include + 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("")) @@ -55,9 +58,8 @@ Cinema::Cinema (cxml::ConstNodePtr node) void Cinema::read_screens (cxml::ConstNodePtr node) { - list s = node->node_children ("Screen"); - for (list::iterator i = s.begin(); i != s.end(); ++i) { - add_screen (shared_ptr (new Screen (*i))); + for (auto i: node->node_children("Screen")) { + add_screen (make_shared(i)); } }