Cleanup: replace some list with vector.
authorCarl Hetherington <cth@carlh.net>
Thu, 18 May 2023 20:21:33 +0000 (22:21 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 18 May 2023 20:21:33 +0000 (22:21 +0200)
17 files changed:
src/lib/cinema.cc
src/lib/cinema.h
src/lib/dkdm_recipient.h
src/lib/emailer.cc
src/lib/emailer.h
src/lib/kdm_cli.cc
src/lib/kdm_with_metadata.h
src/lib/screen.cc
src/lib/send_notification_email_job.cc
src/tools/dcpomatic.cc
src/wx/cinema_dialog.cc
src/wx/cinema_dialog.h
src/wx/recipient_dialog.cc
src/wx/recipient_dialog.h
test/config_test.cc
test/kdm_cli_test.cc
test/kdm_naming_test.cc

index 57780fa7b859cd456f47052fd9b5d9d9ac065175..3b4b9d7b615aa1a7116f4acb221abd3658fe41da 100644 (file)
@@ -91,7 +91,10 @@ Cinema::add_screen (shared_ptr<Screen> s)
 void
 Cinema::remove_screen (shared_ptr<Screen> s)
 {
 void
 Cinema::remove_screen (shared_ptr<Screen> s)
 {
-       _screens.remove (s);
+       auto iter = std::find(_screens.begin(), _screens.end(), s);
+       if (iter != _screens.end()) {
+               _screens.erase(iter);
+       }
 }
 
 void
 }
 
 void
index c17454db980f957aff708857ed4d4bcab76f85bd..6c202a7bfc0e03515925d67162b90ee5c295995f 100644 (file)
@@ -44,7 +44,7 @@ namespace dcpomatic {
 class Cinema : public std::enable_shared_from_this<Cinema>
 {
 public:
 class Cinema : public std::enable_shared_from_this<Cinema>
 {
 public:
-       Cinema (std::string const & name_, std::list<std::string> const & e, std::string notes_, int utc_offset_hour, int utc_offset_minute)
+       Cinema(std::string const & name_, std::vector<std::string> const & e, std::string notes_, int utc_offset_hour, int utc_offset_minute)
                : name (name_)
                , emails (e)
                , notes (notes_)
                : name (name_)
                , emails (e)
                , notes (notes_)
@@ -65,7 +65,7 @@ public:
        void set_utc_offset_minute (int m);
 
        std::string name;
        void set_utc_offset_minute (int m);
 
        std::string name;
-       std::list<std::string> emails;
+       std::vector<std::string> emails;
        std::string notes;
 
        int utc_offset_hour () const {
        std::string notes;
 
        int utc_offset_hour () const {
@@ -76,12 +76,12 @@ public:
                return _utc_offset_minute;
        }
 
                return _utc_offset_minute;
        }
 
-       std::list<std::shared_ptr<dcpomatic::Screen>> screens () const {
+       std::vector<std::shared_ptr<dcpomatic::Screen>> screens() const {
                return _screens;
        }
 
 private:
                return _screens;
        }
 
 private:
-       std::list<std::shared_ptr<dcpomatic::Screen>> _screens;
+       std::vector<std::shared_ptr<dcpomatic::Screen>> _screens;
        /** Offset such that the equivalent time in UTC can be determined
            by subtracting the offset from the local time.
        */
        /** Offset such that the equivalent time in UTC can be determined
            by subtracting the offset from the local time.
        */
index 6e9e4dfb1721bdbb0fdc19dd2954e1f57b53eb25..7a0fa01854c271347fbc96f151367e8b453cb21b 100644 (file)
@@ -33,7 +33,7 @@ public:
                std::string const& name_,
                std::string const& notes_,
                boost::optional<dcp::Certificate> recipient_,
                std::string const& name_,
                std::string const& notes_,
                boost::optional<dcp::Certificate> recipient_,
-               std::list<std::string> emails_,
+               std::vector<std::string> emails_,
                int utc_offset_hour_,
                int utc_offset_minute_
                )
                int utc_offset_hour_,
                int utc_offset_minute_
                )
@@ -49,7 +49,7 @@ public:
 
        void as_xml (xmlpp::Element *) const override;
 
 
        void as_xml (xmlpp::Element *) const override;
 
-       std::list<std::string> emails;
+       std::vector<std::string> emails;
        int utc_offset_hour;
        int utc_offset_minute;
 };
        int utc_offset_hour;
        int utc_offset_minute;
 };
index e21bbfe2d6ae94ecd988590a8b7eedf936158e10..f580e3c56a64361a46229a13b8d0c9794ebe3884 100644 (file)
 
 
 using std::cout;
 
 
 using std::cout;
-using std::list;
 using std::min;
 using std::pair;
 using std::shared_ptr;
 using std::string;
 using std::min;
 using std::pair;
 using std::shared_ptr;
 using std::string;
+using std::vector;
 using dcp::ArrayData;
 
 
 using dcp::ArrayData;
 
 
-Emailer::Emailer (string from, list<string> to, string subject, string body)
+Emailer::Emailer(string from, vector<string> to, string subject, string body)
        : _from (from)
        , _to (to)
        , _subject (subject)
        : _from (from)
        , _to (to)
        , _subject (subject)
@@ -247,7 +247,7 @@ Emailer::send (string server, int port, EmailProtocol protocol, string user, str
 
 
 string
 
 
 string
-Emailer::address_list (list<string> addresses)
+Emailer::address_list(vector<string> addresses)
 {
        string o;
        for (auto i: addresses) {
 {
        string o;
        for (auto i: addresses) {
index ef41b032063b863d5230bad876c431806438500e..78942ad1e15b06913f15fe1c8817f1f0a318e1dd 100644 (file)
@@ -26,7 +26,7 @@
 class Emailer
 {
 public:
 class Emailer
 {
 public:
-       Emailer (std::string from, std::list<std::string> to, std::string subject, std::string body);
+       Emailer(std::string from, std::vector<std::string> to, std::string subject, std::string body);
 
        void add_cc (std::string cc);
        void add_bcc (std::string bcc);
 
        void add_cc (std::string cc);
        void add_bcc (std::string bcc);
@@ -46,7 +46,7 @@ public:
                return _email;
        }
 
                return _email;
        }
 
-       static std::string address_list (std::list<std::string> addresses);
+       static std::string address_list(std::vector<std::string> addresses);
 
 private:
 
 
 private:
 
@@ -54,11 +54,11 @@ private:
        static std::string encode_rfc1342 (std::string subject);
 
        std::string _from;
        static std::string encode_rfc1342 (std::string subject);
 
        std::string _from;
-       std::list<std::string> _to;
+       std::vector<std::string> _to;
        std::string _subject;
        std::string _body;
        std::string _subject;
        std::string _body;
-       std::list<std::string> _cc;
-       std::list<std::string> _bcc;
+       std::vector<std::string> _cc;
+       std::vector<std::string> _bcc;
 
        struct Attachment {
                boost::filesystem::path file;
 
        struct Attachment {
                boost::filesystem::path file;
@@ -66,7 +66,7 @@ private:
                std::string mime_type;
        };
 
                std::string mime_type;
        };
 
-       std::list<Attachment> _attachments;
+       std::vector<Attachment> _attachments;
        std::string _email;
        size_t _offset;
        std::string _notes;
        std::string _email;
        size_t _offset;
        std::string _notes;
index 9256261199621261ae335b27eaf96c9eb81161a7..05a59142f1f037bf77f0fbcbb50e626eb04ed791 100644 (file)
@@ -203,7 +203,7 @@ find_cinema (string cinema_name)
 static
 void
 from_film (
 static
 void
 from_film (
-       list<shared_ptr<Screen>> screens,
+       vector<shared_ptr<Screen>> screens,
        boost::filesystem::path film_dir,
        bool verbose,
        boost::filesystem::path output,
        boost::filesystem::path film_dir,
        bool verbose,
        boost::filesystem::path output,
@@ -346,7 +346,7 @@ kdm_from_dkdm (
 static
 void
 from_dkdm (
 static
 void
 from_dkdm (
-       list<shared_ptr<Screen>> screens,
+       vector<shared_ptr<Screen>> screens,
        dcp::DecryptedKDM dkdm,
        bool verbose,
        boost::filesystem::path output,
        dcp::DecryptedKDM dkdm,
        bool verbose,
        boost::filesystem::path output,
@@ -396,7 +396,7 @@ from_dkdm (
                        name_values['e'] = end.date() + " " + end.time_of_day(true, false);
                        name_values['i'] = kdm.cpl_id();
 
                        name_values['e'] = end.date() + " " + end.time_of_day(true, false);
                        name_values['i'] = kdm.cpl_id();
 
-                       kdms.push_back (make_shared<KDMWithMetadata>(name_values, i->cinema.get(), i->cinema ? i->cinema->emails : list<string>(), kdm));
+                       kdms.push_back(make_shared<KDMWithMetadata>(name_values, i->cinema.get(), i->cinema ? i->cinema->emails : vector<string>(), kdm));
                }
                write_files (kdms, zip, output, container_name_format, filename_format, verbose, out);
                if (email) {
                }
                write_files (kdms, zip, output, container_name_format, filename_format, verbose, out);
                if (email) {
@@ -441,7 +441,7 @@ try
        shared_ptr<Cinema> cinema;
        optional<boost::filesystem::path> certificate;
        optional<string> screen;
        shared_ptr<Cinema> cinema;
        optional<boost::filesystem::path> certificate;
        optional<string> screen;
-       list<shared_ptr<Screen>> screens;
+       vector<shared_ptr<Screen>> screens;
        optional<dcp::EncryptedKDM> dkdm;
        optional<boost::posix_time::ptime> valid_from;
        optional<boost::posix_time::ptime> valid_to;
        optional<dcp::EncryptedKDM> dkdm;
        optional<boost::posix_time::ptime> valid_from;
        optional<boost::posix_time::ptime> valid_to;
@@ -552,7 +552,7 @@ try
                           (for lookup) and by creating a Cinema which the next Screen will be added to.
                        */
                        cinema_name = optarg;
                           (for lookup) and by creating a Cinema which the next Screen will be added to.
                        */
                        cinema_name = optarg;
-                       cinema = make_shared<Cinema>(optarg, list<string>(), "", 0, 0);
+                       cinema = make_shared<Cinema>(optarg, vector<string>(), "", 0, 0);
                        break;
                case 'S':
                        /* Similarly, this could be the name of a new (temporary) screen or the name of a screen
                        break;
                case 'S':
                        /* Similarly, this could be the name of a new (temporary) screen or the name of a screen
index df9f041251ec9d8075b338cd164ea0bc50949ece..fbeeffbc13403614ed5c1a7439975b5c16edefd9 100644 (file)
@@ -33,7 +33,7 @@ class Cinema;
 class KDMWithMetadata
 {
 public:
 class KDMWithMetadata
 {
 public:
-       KDMWithMetadata (dcp::NameFormat::Map const& name_values, void const* group, std::list<std::string> emails, dcp::EncryptedKDM kdm)
+       KDMWithMetadata(dcp::NameFormat::Map const& name_values, void const* group, std::vector<std::string> emails, dcp::EncryptedKDM kdm)
                : _name_values (name_values)
                , _group (group)
                , _emails (emails)
                : _name_values (name_values)
                , _group (group)
                , _emails (emails)
@@ -58,14 +58,14 @@ public:
                return _group;
        }
 
                return _group;
        }
 
-       std::list<std::string> emails () const {
+       std::vector<std::string> emails() const {
                return _emails;
        }
 
 private:
        dcp::NameFormat::Map _name_values;
        void const* _group;
                return _emails;
        }
 
 private:
        dcp::NameFormat::Map _name_values;
        void const* _group;
-       std::list<std::string> _emails;
+       std::vector<std::string> _emails;
        dcp::EncryptedKDM _kdm;
 };
 
        dcp::EncryptedKDM _kdm;
 };
 
index dbf013111e3465637ddcd210405fe5536e5aa9ee..097ff80b8bfbc77cf6358ffdc081e66213b7332b 100644 (file)
@@ -116,6 +116,6 @@ kdm_for_screen (
        name_values['e'] = end.date() + " " + end.time_of_day(true, false);
        name_values['i'] = kdm.cpl_id();
 
        name_values['e'] = end.date() + " " + end.time_of_day(true, false);
        name_values['i'] = kdm.cpl_id();
 
-       return make_shared<KDMWithMetadata>(name_values, cinema.get(), cinema ? cinema->emails : list<string>(), kdm);
+       return make_shared<KDMWithMetadata>(name_values, cinema.get(), cinema ? cinema->emails : vector<string>(), kdm);
 }
 
 }
 
index c4d5a65183ca93484e9b225628e46a59d836f3a1..2dd1f63f269f7558af4b40523c66331a257cf786 100644 (file)
 #include "config.h"
 #include "emailer.h"
 #include "compose.hpp"
 #include "config.h"
 #include "emailer.h"
 #include "compose.hpp"
-#include <list>
 
 #include "i18n.h"
 
 
 using std::string;
 
 #include "i18n.h"
 
 
 using std::string;
-using std::list;
 using std::shared_ptr;
 
 
 using std::shared_ptr;
 
 
@@ -73,9 +71,7 @@ SendNotificationEmailJob::run ()
        }
 
        set_progress_unknown ();
        }
 
        set_progress_unknown ();
-       list<string> to;
-       to.push_back (config->notification_to());
-       Emailer email (config->notification_from(), to, config->notification_subject(), _body);
+       Emailer email (config->notification_from(), { config->notification_to() }, config->notification_subject(), _body);
        for (auto i: config->notification_cc()) {
                email.add_cc (i);
        }
        for (auto i: config->notification_cc()) {
                email.add_cc (i);
        }
index 3d944e780a9358cbbe828e6d2f050d11d73ceaf6..d6b6bc2b72aaba15126950ebdf4244c7e051d260 100644 (file)
@@ -1115,12 +1115,11 @@ private:
                for (auto i: translations) {
                        body += i.first + "\n" + i.second + "\n\n";
                }
                for (auto i: translations) {
                        body += i.first + "\n" + i.second + "\n\n";
                }
-               list<string> to = { "carl@dcpomatic.com" };
                if (dialog.email().find("@") == string::npos) {
                        error_dialog (this, _("You must enter a valid email address when sending translations, "
                                              "otherwise the DCP-o-matic maintainers cannot credit you or contact you with questions."));
                } else {
                if (dialog.email().find("@") == string::npos) {
                        error_dialog (this, _("You must enter a valid email address when sending translations, "
                                              "otherwise the DCP-o-matic maintainers cannot credit you or contact you with questions."));
                } else {
-                       Emailer emailer(dialog.email(), to, "DCP-o-matic translations", body);
+                       Emailer emailer(dialog.email(), { "carl@dcpomatic.com" }, "DCP-o-matic translations", body);
                        try {
                                emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS);
                        } catch (NetworkError& e) {
                        try {
                                emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS);
                        } catch (NetworkError& e) {
index 8c7194c4a7433084878347568ddcdb1ccb17e322..84fde5f41acb0985a4ed45d74a7612650e51d7d2 100644 (file)
@@ -28,7 +28,6 @@
 using std::back_inserter;
 using std::copy;
 using std::cout;
 using std::back_inserter;
 using std::copy;
 using std::cout;
-using std::list;
 using std::string;
 using std::vector;
 using boost::bind;
 using std::string;
 using std::vector;
 using boost::bind;
@@ -37,7 +36,7 @@ using namespace boost::placeholders;
 #endif
 
 
 #endif
 
 
-CinemaDialog::CinemaDialog (wxWindow* parent, wxString title, string name, list<string> emails, string notes, int utc_offset_hour, int utc_offset_minute)
+CinemaDialog::CinemaDialog(wxWindow* parent, wxString title, string name, vector<string> emails, string notes, int utc_offset_hour, int utc_offset_minute)
        : wxDialog (parent, wxID_ANY, title)
 {
        auto overall_sizer = new wxBoxSizer (wxVERTICAL);
        : wxDialog (parent, wxID_ANY, title)
 {
        auto overall_sizer = new wxBoxSizer (wxVERTICAL);
@@ -69,7 +68,7 @@ CinemaDialog::CinemaDialog (wxWindow* parent, wxString title, string name, list<
        vector<EditableListColumn> columns;
        columns.push_back (EditableListColumn(_("Address"), 500, true));
        _email_list = new EditableList<string, EmailDialog> (
        vector<EditableListColumn> columns;
        columns.push_back (EditableListColumn(_("Address"), 500, true));
        _email_list = new EditableList<string, EmailDialog> (
-               this, columns, bind (&CinemaDialog::get_emails, this), bind (&CinemaDialog::set_emails, this, _1), [](string s, int) {
+               this, columns, bind(&CinemaDialog::emails, this), bind (&CinemaDialog::set_emails, this, _1), [](string s, int) {
                        return s;
                }, EditableListTitle::INVISIBLE, EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
                );
                        return s;
                }, EditableListTitle::INVISIBLE, EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
                );
@@ -117,21 +116,12 @@ CinemaDialog::set_emails (vector<string> e)
 
 
 vector<string>
 
 
 vector<string>
-CinemaDialog::get_emails () const
+CinemaDialog::emails() const
 {
        return _emails;
 }
 
 
 {
        return _emails;
 }
 
 
-list<string>
-CinemaDialog::emails () const
-{
-       list<string> e;
-       copy (_emails.begin(), _emails.end(), back_inserter(e));
-       return e;
-}
-
-
 int
 CinemaDialog::utc_offset_hour () const
 {
 int
 CinemaDialog::utc_offset_hour () const
 {
index a878e605557cf7a6cf850b82f9d1ecc8728131fe..0b8362843de68f759c08a08c1b0aae8367b0d093 100644 (file)
@@ -37,7 +37,7 @@ public:
                wxWindow *,
                wxString,
                std::string name = "",
                wxWindow *,
                wxString,
                std::string name = "",
-               std::list<std::string> emails = std::list<std::string> (),
+               std::vector<std::string> emails = std::vector<std::string>(),
                std::string notes = "",
                int utc_offset_hour = 0,
                int utc_offset_minute = 0
                std::string notes = "",
                int utc_offset_hour = 0,
                int utc_offset_minute = 0
@@ -45,12 +45,11 @@ public:
 
        std::string name () const;
        std::string notes () const;
 
        std::string name () const;
        std::string notes () const;
-       std::list<std::string> emails () const;
+       std::vector<std::string> emails () const;
        int utc_offset_hour () const;
        int utc_offset_minute () const;
 
 private:
        int utc_offset_hour () const;
        int utc_offset_minute () const;
 
 private:
-       std::vector<std::string> get_emails () const;
        void set_emails (std::vector<std::string>);
 
        wxTextCtrl* _name;
        void set_emails (std::vector<std::string>);
 
        wxTextCtrl* _name;
index b685f884aab55fe5f993715ed0cafd0529893f2e..b166f265d0f5f1a5543046e1098944515fa4d8ac 100644 (file)
@@ -38,7 +38,6 @@ LIBDCP_ENABLE_WARNINGS
 
 
 using std::cout;
 
 
 using std::cout;
-using std::list;
 using std::string;
 using std::vector;
 using boost::bind;
 using std::string;
 using std::vector;
 using boost::bind;
@@ -56,7 +55,7 @@ column (string s)
 
 
 RecipientDialog::RecipientDialog (
 
 
 RecipientDialog::RecipientDialog (
-       wxWindow* parent, wxString title, string name, string notes, list<string> emails, int utc_offset_hour, int utc_offset_minute, optional<dcp::Certificate> recipient
+       wxWindow* parent, wxString title, string name, string notes, vector<string> emails, int utc_offset_hour, int utc_offset_minute, optional<dcp::Certificate> recipient
        )
        : wxDialog (parent, wxID_ANY, title)
        , _recipient (recipient)
        )
        : wxDialog (parent, wxID_ANY, title)
        , _recipient (recipient)
@@ -233,12 +232,10 @@ RecipientDialog::set_emails (vector<string> e)
 }
 
 
 }
 
 
-list<string>
+vector<string>
 RecipientDialog::emails () const
 {
 RecipientDialog::emails () const
 {
-       list<string> e;
-       copy (_emails.begin(), _emails.end(), back_inserter(e));
-       return e;
+       return _emails;
 }
 
 
 }
 
 
index 2ed6d3f31f1591ee2a4d283cce446fb8de3c47e9..a46e67af5b907ebdfe3fa2b2fa441f091cff1355 100644 (file)
@@ -43,7 +43,7 @@ public:
                wxString,
                std::string name = "",
                std::string notes = "",
                wxString,
                std::string name = "",
                std::string notes = "",
-               std::list<std::string> emails = std::list<std::string>(),
+               std::vector<std::string> emails = std::vector<std::string>(),
                int utc_offset_hour = 0,
                int utc_offset_minute = 0,
                boost::optional<dcp::Certificate> c = boost::optional<dcp::Certificate>()
                int utc_offset_hour = 0,
                int utc_offset_minute = 0,
                boost::optional<dcp::Certificate> c = boost::optional<dcp::Certificate>()
@@ -52,7 +52,7 @@ public:
        std::string name () const;
        std::string notes () const;
        boost::optional<dcp::Certificate> recipient () const;
        std::string name () const;
        std::string notes () const;
        boost::optional<dcp::Certificate> recipient () const;
-       std::list<std::string> emails () const;
+       std::vector<std::string> emails () const;
        int utc_offset_hour () const;
        int utc_offset_minute () const;
 
        int utc_offset_hour () const;
        int utc_offset_minute () const;
 
index e905500852428e9e8a56afb202342101457b3a22..103a6a58555ac0f181353afac8f6f257c14f495d 100644 (file)
 #include <fstream>
 
 
 #include <fstream>
 
 
-using std::list;
-using std::ofstream;
 using std::make_shared;
 using std::make_shared;
+using std::ofstream;
 using std::string;
 using std::string;
+using std::vector;
 using boost::optional;
 
 
 using boost::optional;
 
 
@@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE (config_keep_cinemas_if_making_new_config)
 
        Config::instance()->write();
 
 
        Config::instance()->write();
 
-       Config::instance()->add_cinema(make_shared<Cinema>("My Great Cinema", list<string>(), "", 0, 0));
+       Config::instance()->add_cinema(make_shared<Cinema>("My Great Cinema", vector<string>(), "", 0, 0));
        Config::instance()->write();
 
        boost::filesystem::copy_file (dir / "cinemas.xml", dir / "backup_for_test.xml");
        Config::instance()->write();
 
        boost::filesystem::copy_file (dir / "cinemas.xml", dir / "backup_for_test.xml");
index e300d82a5a04b8b481861ebb8ca47458b22ac791..c91cb64f41f01975c3572e5f5596a55ca5e6e709 100644 (file)
@@ -31,7 +31,6 @@
 #include <iostream>
 
 
 #include <iostream>
 
 
-using std::list;
 using std::string;
 using std::vector;
 using boost::optional;
 using std::string;
 using std::vector;
 using boost::optional;
@@ -86,13 +85,13 @@ setup_test_config()
        auto config = Config::instance();
        auto const cert = dcp::Certificate(dcp::file_to_string("test/data/cert.pem"));
 
        auto config = Config::instance();
        auto const cert = dcp::Certificate(dcp::file_to_string("test/data/cert.pem"));
 
-       auto cinema_a = std::make_shared<Cinema>("Dean's Screens", list<string>(), "", 0, 0);
+       auto cinema_a = std::make_shared<Cinema>("Dean's Screens", vector<string>(), "", 0, 0);
        cinema_a->add_screen(std::make_shared<dcpomatic::Screen>("Screen 1", "", cert, boost::none, std::vector<TrustedDevice>()));
        cinema_a->add_screen(std::make_shared<dcpomatic::Screen>("Screen 2", "", cert, boost::none, std::vector<TrustedDevice>()));
        cinema_a->add_screen(std::make_shared<dcpomatic::Screen>("Screen 3", "", cert, boost::none, std::vector<TrustedDevice>()));
        config->add_cinema(cinema_a);
 
        cinema_a->add_screen(std::make_shared<dcpomatic::Screen>("Screen 1", "", cert, boost::none, std::vector<TrustedDevice>()));
        cinema_a->add_screen(std::make_shared<dcpomatic::Screen>("Screen 2", "", cert, boost::none, std::vector<TrustedDevice>()));
        cinema_a->add_screen(std::make_shared<dcpomatic::Screen>("Screen 3", "", cert, boost::none, std::vector<TrustedDevice>()));
        config->add_cinema(cinema_a);
 
-       auto cinema_b = std::make_shared<Cinema>("Floyd's Celluloid", list<string>(), "", 0, 0);
+       auto cinema_b = std::make_shared<Cinema>("Floyd's Celluloid", vector<string>(), "", 0, 0);
        cinema_b->add_screen(std::make_shared<dcpomatic::Screen>("Foo", "", cert, boost::none, std::vector<TrustedDevice>()));
        cinema_b->add_screen(std::make_shared<dcpomatic::Screen>("Bar", "", cert, boost::none, std::vector<TrustedDevice>()));
        config->add_cinema(cinema_b);
        cinema_b->add_screen(std::make_shared<dcpomatic::Screen>("Foo", "", cert, boost::none, std::vector<TrustedDevice>()));
        cinema_b->add_screen(std::make_shared<dcpomatic::Screen>("Bar", "", cert, boost::none, std::vector<TrustedDevice>()));
        config->add_cinema(cinema_b);
index 30356afbfe36015dcd6e03c06af3abd123145869..32500553e90e48065c6786064eaa94f5cf628e94 100644 (file)
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test)
        auto crypt_cert = c->decryption_chain()->leaf();
 
        /* Cinema A: UTC +4:30 */
        auto crypt_cert = c->decryption_chain()->leaf();
 
        /* Cinema A: UTC +4:30 */
-       auto cinema_a = make_shared<Cinema>("Cinema A", list<string>(), "", 4, 30);
+       auto cinema_a = make_shared<Cinema>("Cinema A", vector<string>(), "", 4, 30);
        cinema_a_screen_1 = std::make_shared<dcpomatic::Screen>("Screen 1", "", crypt_cert, boost::none, vector<TrustedDevice>());
        cinema_a->add_screen (cinema_a_screen_1);
        cinema_a_screen_2 = std::make_shared<dcpomatic::Screen>("Screen 2", "", crypt_cert, boost::none, vector<TrustedDevice>());
        cinema_a_screen_1 = std::make_shared<dcpomatic::Screen>("Screen 1", "", crypt_cert, boost::none, vector<TrustedDevice>());
        cinema_a->add_screen (cinema_a_screen_1);
        cinema_a_screen_2 = std::make_shared<dcpomatic::Screen>("Screen 2", "", crypt_cert, boost::none, vector<TrustedDevice>());
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test)
        c->add_cinema (cinema_a);
 
        /* Cinema B: UTC -1:00 */
        c->add_cinema (cinema_a);
 
        /* Cinema B: UTC -1:00 */
-       auto cinema_b = make_shared<Cinema>("Cinema B", list<string>(), "", -1, 0);
+       auto cinema_b = make_shared<Cinema>("Cinema B", vector<string>(), "", -1, 0);
        cinema_b_screen_x = std::make_shared<dcpomatic::Screen>("Screen X", "", crypt_cert, boost::none, vector<TrustedDevice>());
        cinema_b->add_screen (cinema_b_screen_x);
        cinema_b_screen_y = std::make_shared<dcpomatic::Screen>("Screen Y", "", crypt_cert, boost::none, vector<TrustedDevice>());
        cinema_b_screen_x = std::make_shared<dcpomatic::Screen>("Screen X", "", crypt_cert, boost::none, vector<TrustedDevice>());
        cinema_b->add_screen (cinema_b_screen_x);
        cinema_b_screen_y = std::make_shared<dcpomatic::Screen>("Screen Y", "", crypt_cert, boost::none, vector<TrustedDevice>());
@@ -160,7 +160,7 @@ BOOST_AUTO_TEST_CASE (directory_kdm_naming_test, * boost::unit_test::depends_on(
        string const from_string = from.date() + " " + from.time_of_day(true, false);
        string const until_string = until.date() + " " + until.time_of_day(true, false);
 
        string const from_string = from.date() + " " + from.time_of_day(true, false);
        string const until_string = until.date() + " " + until.time_of_day(true, false);
 
-       list<shared_ptr<dcpomatic::Screen>> screens = {
+       vector<shared_ptr<dcpomatic::Screen>> screens = {
                cinema_a_screen_2, cinema_b_screen_x, cinema_a_screen_1, (cinema_b_screen_z)
        };
 
                cinema_a_screen_2, cinema_b_screen_x, cinema_a_screen_1, (cinema_b_screen_z)
        };