C++11 tidying.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Feb 2021 09:40:12 +0000 (10:40 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Feb 2021 09:40:12 +0000 (10:40 +0100)
19 files changed:
src/lib/audio_ring_buffers.cc
src/lib/audio_ring_buffers.h
src/lib/decoder.cc
src/lib/decoder.h
src/lib/digester.cc
src/lib/digester.h
src/lib/frame_interval_checker.h
src/lib/job_manager.cc
src/lib/job_manager.h
src/lib/playlist.cc
src/lib/playlist.h
src/lib/ratio.cc
src/lib/ratio.h
src/tools/dcpomatic.cc
src/wx/content_widget.h
src/wx/timeline_view.cc
src/wx/timeline_view.h
src/wx/video_view.cc
src/wx/video_view.h

index 289045ff529b445d8aa2ce0927423fd9a38820bd..1a216ab33749399fadf51b24eb3392a3b3ee895d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016-2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "audio_ring_buffers.h"
 #include "dcpomatic_assert.h"
 #include "exceptions.h"
 #include <iostream>
 
+
 using std::min;
 using std::cout;
 using std::make_pair;
@@ -32,12 +34,13 @@ using std::shared_ptr;
 using boost::optional;
 using namespace dcpomatic;
 
+
 AudioRingBuffers::AudioRingBuffers ()
-       : _used_in_head (0)
 {
 
 }
 
+
 /** @param frame_rate Frame rate in use; this is only used to check timing consistency of the incoming data */
 void
 AudioRingBuffers::put (shared_ptr<const AudioBuffers> data, DCPTime time, int frame_rate)
@@ -56,6 +59,7 @@ AudioRingBuffers::put (shared_ptr<const AudioBuffers> data, DCPTime time, int fr
        _buffers.push_back(make_pair(data, time));
 }
 
+
 /** @return time of the returned data; if it's not set this indicates an underrun */
 optional<DCPTime>
 AudioRingBuffers::get (float* out, int channels, int frames)
@@ -75,7 +79,7 @@ AudioRingBuffers::get (float* out, int channels, int frames)
                        return time;
                }
 
-               pair<shared_ptr<const AudioBuffers>, DCPTime> front = _buffers.front ();
+               auto front = _buffers.front ();
                if (!time) {
                        time = front.second + DCPTime::from_frames(_used_in_head, 48000);
                }
@@ -103,16 +107,18 @@ AudioRingBuffers::get (float* out, int channels, int frames)
        return time;
 }
 
+
 optional<DCPTime>
 AudioRingBuffers::peek () const
 {
        boost::mutex::scoped_lock lm (_mutex);
        if (_buffers.empty()) {
-               return optional<DCPTime>();
+               return {};
        }
        return _buffers.front().second;
 }
 
+
 void
 AudioRingBuffers::clear ()
 {
@@ -121,13 +127,14 @@ AudioRingBuffers::clear ()
        _used_in_head = 0;
 }
 
+
 Frame
 AudioRingBuffers::size () const
 {
        boost::mutex::scoped_lock lm (_mutex);
        Frame s = 0;
-       for (list<pair<shared_ptr<const AudioBuffers>, DCPTime> >::const_iterator i = _buffers.begin(); i != _buffers.end(); ++i) {
-               s += i->first->frames();
+       for (auto const& i: _buffers) {
+               s += i.first->frames();
        }
        return s - _used_in_head;
 }
index 2cfc0a30bbe534cfa6a4941c8adb141d38a46873..be8a616e22ce582d95bf724ac9f53f6a0f3b53e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016-2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_AUDIO_RING_BUFFERS_H
 #define DCPOMATIC_AUDIO_RING_BUFFERS_H
 
+
 #include "audio_buffers.h"
 #include "types.h"
 #include "dcpomatic_time.h"
 #include <boost/thread.hpp>
 #include <list>
 
-class AudioRingBuffers : public boost::noncopyable
+
+class AudioRingBuffers
 {
 public:
        AudioRingBuffers ();
 
+       AudioRingBuffers (AudioBuffers const&) = delete;
+       AudioRingBuffers& operator= (AudioBuffers const&) = delete;
+
        void put (std::shared_ptr<const AudioBuffers> data, dcpomatic::DCPTime time, int frame_rate);
        boost::optional<dcpomatic::DCPTime> get (float* out, int channels, int frames);
        boost::optional<dcpomatic::DCPTime> peek () const;
@@ -42,7 +48,8 @@ public:
 private:
        mutable boost::mutex _mutex;
        std::list<std::pair<std::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime> > _buffers;
-       int _used_in_head;
+       int _used_in_head = 0;
 };
 
+
 #endif
index bf0bd1a26945783d3501b9f91e82ac358a5bedc0..5d191512874916c74a82eed7ce049b9e2e33803d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -18,6 +18,7 @@
 
 */
 
+
 #include "decoder.h"
 #include "video_decoder.h"
 #include "audio_decoder.h"
 #include <boost/optional.hpp>
 #include <iostream>
 
+
 using std::cout;
 using boost::optional;
 using std::shared_ptr;
 using std::weak_ptr;
 using namespace dcpomatic;
 
+
 Decoder::Decoder (weak_ptr<const Film> film)
        : WeakConstFilm (film)
 {
 
 }
 
+
 /** @return Earliest time of content that the next pass() will emit */
 ContentTime
 Decoder::position () const
 {
        optional<ContentTime> pos;
-       shared_ptr<const Film> f = film();
+       auto f = film();
 
        if (video && !video->ignore() && (!pos || video->position(f).get_value_or(ContentTime()) < *pos)) {
                pos = video->position(f);
@@ -70,6 +74,7 @@ Decoder::position () const
        return pos.get_value_or(ContentTime());
 }
 
+
 void
 Decoder::seek (ContentTime, bool)
 {
@@ -84,12 +89,13 @@ Decoder::seek (ContentTime, bool)
        }
 }
 
+
 shared_ptr<TextDecoder>
 Decoder::only_text () const
 {
        DCPOMATIC_ASSERT (text.size() < 2);
-       if (text.empty ()) {
-               return shared_ptr<TextDecoder> ();
+       if (text.empty()) {
+               return {};
        }
-       return text.front ();
+       return text.front();
 }
index da5be4af679ccbda8b7c2100e2af3e5ce52b82e6..a672e8a10de0c090b8cf9fa520a007d46fe38a37 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @file  src/decoder.h
  *  @brief Decoder class.
  */
 
+
 #ifndef DCPOMATIC_DECODER_H
 #define DCPOMATIC_DECODER_H
 
-#include "types.h"
+
+#include "dcpomatic_time.h"
 #include "film.h"
 #include "font_data.h"
-#include "dcpomatic_time.h"
+#include "types.h"
 #include "weak_film.h"
 #include <boost/utility.hpp>
 
-class Decoded;
-class VideoDecoder;
-class AudioDecoder;
-class TextDecoder;
+
 class AtmosDecoder;
+class AudioDecoder;
+class Decoded;
 class DecoderPart;
+class TextDecoder;
+class VideoDecoder;
+
 
 /** @class Decoder.
  *  @brief Parent class for decoders of content.
  */
-class Decoder : public boost::noncopyable, public WeakConstFilm
+class Decoder : public WeakConstFilm
 {
 public:
        Decoder (std::weak_ptr<const Film> film);
        virtual ~Decoder () {}
 
+       Decoder (Decoder const&) = delete;
+       Decoder& operator= (Decoder const&) = delete;
+
        std::shared_ptr<VideoDecoder> video;
        std::shared_ptr<AudioDecoder> audio;
-       std::list<std::shared_ptr<TextDecoder> > text;
+       std::list<std::shared_ptr<TextDecoder>> text;
        std::shared_ptr<AtmosDecoder> atmos;
 
        std::shared_ptr<TextDecoder> only_text () const;
@@ -64,8 +72,9 @@ public:
        virtual dcpomatic::ContentTime position () const;
 
        virtual std::vector<dcpomatic::FontData> fonts () const {
-               return std::vector<dcpomatic::FontData>();
+               return {};
        }
 };
 
+
 #endif
index 452452ba4b1c1091622a001c639446d83f2f2989..8542c75a13358a0a97dc9c2fa51e5c86c63ec8b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "digester.h"
 #include "dcpomatic_assert.h"
 #include <nettle/md5.h>
 #include <iomanip>
 #include <cstdio>
 
+
 using std::string;
 using std::hex;
 using std::setfill;
 using std::setw;
 
+
 Digester::Digester ()
 {
        md5_init (&_context);
 }
 
+
 Digester::~Digester ()
 {
        get ();
 }
 
+
 void
 Digester::add (void const * data, size_t size)
 {
-       md5_update (&_context, size, reinterpret_cast<uint8_t const *> (data));
+       md5_update (&_context, size, reinterpret_cast<uint8_t const *>(data));
 }
 
+
 void
 Digester::add (string const & s)
 {
        add (s.c_str(), s.length());
 }
 
+
 string
 Digester::get () const
 {
@@ -69,6 +76,7 @@ Digester::get () const
        return _digest.get ();
 }
 
+
 void
 Digester::get (uint8_t* buffer) const
 {
index 6cdaf2331b8bda04a7aec588c659add946f8c79c..e4daabd68d265e5bc3af8acdc590484819a611aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include <nettle/md5.h>
-#include <boost/noncopyable.hpp>
 #include <boost/optional.hpp>
 #include <string>
 
-class Digester : public boost::noncopyable
+
+class Digester
 {
 public:
        Digester ();
        ~Digester ();
 
+       Digester (Digester const&) = delete;
+       Digester& operator= (Digester const&) = delete;
+
        void add (void const * data, size_t size);
 
        template <class T>
index a8db31a497609429922c02e383de1bc1fb80cfba..e8f537c1a6a5ef67b360ac3a26196805e96503bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "dcpomatic_time.h"
 #include <boost/optional.hpp>
-#include <boost/noncopyable.hpp>
 #include <vector>
 
-class FrameIntervalChecker : public boost::noncopyable
+
+class FrameIntervalChecker
 {
 public:
+       FrameIntervalChecker () {}
+       FrameIntervalChecker (FrameIntervalChecker const &) = delete;
+       FrameIntervalChecker& operator= (FrameIntervalChecker const &) = delete;
+
        void feed (dcpomatic::ContentTime time, double frame_rate);
 
        enum Guess
index 1724879d0656ffe38b0a6962374a1489744af377..2839bce30c379f8c98c85cffe5af54e0bd36cb50 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @file  src/job_manager.cc
  *  @brief A simple scheduler for jobs.
  */
 
-#include "job_manager.h"
-#include "job.h"
-#include "cross.h"
+
 #include "analyse_audio_job.h"
 #include "analyse_subtitles_job.h"
+#include "cross.h"
 #include "film.h"
+#include "job.h"
+#include "job_manager.h"
 #include <boost/thread.hpp>
-#include <iostream>
 
-using std::string;
+
+using std::dynamic_pointer_cast;
 using std::list;
-using std::cout;
+using std::make_shared;
 using std::shared_ptr;
+using std::string;
 using std::weak_ptr;
+using boost::bind;
 using boost::function;
-using std::dynamic_pointer_cast;
 using boost::optional;
-using boost::bind;
 
-JobManager* JobManager::_instance = 0;
+
+JobManager* JobManager::_instance = nullptr;
+
 
 JobManager::JobManager ()
-       : _terminate (false)
-       , _paused (false)
 {
 
 }
 
+
 void
 JobManager::start ()
 {
@@ -59,6 +62,7 @@ JobManager::start ()
 #endif
 }
 
+
 JobManager::~JobManager ()
 {
        boost::this_thread::disable_interruption dis;
@@ -78,6 +82,7 @@ JobManager::~JobManager ()
        } catch (...) {}
 }
 
+
 shared_ptr<Job>
 JobManager::add (shared_ptr<Job> j)
 {
@@ -87,39 +92,42 @@ JobManager::add (shared_ptr<Job> j)
                _empty_condition.notify_all ();
        }
 
-       emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
+       emit (boost::bind(boost::ref(JobAdded), weak_ptr<Job>(j)));
 
        return j;
 }
 
+
 shared_ptr<Job>
 JobManager::add_after (shared_ptr<Job> after, shared_ptr<Job> j)
 {
        {
                boost::mutex::scoped_lock lm (_mutex);
-               list<shared_ptr<Job> >::iterator i = find (_jobs.begin(), _jobs.end(), after);
+               auto i = find (_jobs.begin(), _jobs.end(), after);
                DCPOMATIC_ASSERT (i != _jobs.end());
                _jobs.insert (i, j);
                _empty_condition.notify_all ();
        }
 
-       emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
+       emit (boost::bind(boost::ref(JobAdded), weak_ptr<Job>(j)));
 
        return j;
 }
 
-list<shared_ptr<Job> >
+
+list<shared_ptr<Job>>
 JobManager::get () const
 {
        boost::mutex::scoped_lock lm (_mutex);
        return _jobs;
 }
 
+
 bool
 JobManager::work_to_do () const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       list<shared_ptr<Job> >::const_iterator i = _jobs.begin();
+       auto i = _jobs.begin();
        while (i != _jobs.end() && (*i)->finished()) {
                ++i;
        }
@@ -127,12 +135,13 @@ JobManager::work_to_do () const
        return i != _jobs.end ();
 }
 
+
 bool
 JobManager::errors () const
 {
        boost::mutex::scoped_lock lm (_mutex);
        for (auto i: _jobs) {
-               if (i->finished_in_error ()) {
+               if (i->finished_in_error()) {
                        return true;
                }
        }
@@ -140,6 +149,7 @@ JobManager::errors () const
        return false;
 }
 
+
 void
 JobManager::scheduler ()
 {
@@ -183,22 +193,24 @@ JobManager::scheduler ()
        }
 }
 
+
 void
 JobManager::job_finished ()
 {
        {
                boost::mutex::scoped_lock lm (_mutex);
-               emit (boost::bind (boost::ref (ActiveJobsChanged), _last_active_job, optional<string>()));
+               emit (boost::bind(boost::ref (ActiveJobsChanged), _last_active_job, optional<string>()));
                _last_active_job = optional<string>();
        }
 
        _empty_condition.notify_all ();
 }
 
+
 JobManager *
 JobManager::instance ()
 {
-       if (_instance == 0) {
+       if (!_instance) {
                _instance = new JobManager ();
                _instance->start ();
        }
@@ -206,13 +218,15 @@ JobManager::instance ()
        return _instance;
 }
 
+
 void
 JobManager::drop ()
 {
        delete _instance;
-       _instance = 0;
+       _instance = nullptr;
 }
 
+
 void
 JobManager::analyse_audio (
        shared_ptr<const Film> film,
@@ -226,7 +240,7 @@ JobManager::analyse_audio (
                boost::mutex::scoped_lock lm (_mutex);
 
                for (auto i: _jobs) {
-                       shared_ptr<AnalyseAudioJob> a = dynamic_pointer_cast<AnalyseAudioJob> (i);
+                       auto a = dynamic_pointer_cast<AnalyseAudioJob> (i);
                        if (a && a->path() == film->audio_analysis_path(playlist) && !i->finished_cancelled()) {
                                i->when_finished (connection, ready);
                                return;
@@ -239,7 +253,7 @@ JobManager::analyse_audio (
        {
                boost::mutex::scoped_lock lm (_mutex);
 
-               job.reset (new AnalyseAudioJob (film, playlist, from_zero));
+               job = make_shared<AnalyseAudioJob> (film, playlist, from_zero);
                connection = job->Finished.connect (ready);
                _jobs.push_back (job);
                _empty_condition.notify_all ();
@@ -261,7 +275,7 @@ JobManager::analyse_subtitles (
                boost::mutex::scoped_lock lm (_mutex);
 
                for (auto i: _jobs) {
-                       shared_ptr<AnalyseSubtitlesJob> a = dynamic_pointer_cast<AnalyseSubtitlesJob> (i);
+                       auto a = dynamic_pointer_cast<AnalyseSubtitlesJob> (i);
                        if (a && a->path() == film->subtitle_analysis_path(content)) {
                                i->when_finished (connection, ready);
                                return;
@@ -274,13 +288,13 @@ JobManager::analyse_subtitles (
        {
                boost::mutex::scoped_lock lm (_mutex);
 
-               job.reset (new AnalyseSubtitlesJob(film, content));
+               job = make_shared<AnalyseSubtitlesJob>(film, content);
                connection = job->Finished.connect (ready);
                _jobs.push_back (job);
                _empty_condition.notify_all ();
        }
 
-       emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (job)));
+       emit (boost::bind(boost::ref(JobAdded), weak_ptr<Job>(job)));
 }
 
 
@@ -291,8 +305,8 @@ JobManager::increase_priority (shared_ptr<Job> job)
 
        {
                boost::mutex::scoped_lock lm (_mutex);
-               list<shared_ptr<Job> >::iterator last = _jobs.end ();
-               for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
+               auto last = _jobs.end ();
+               for (auto i = _jobs.begin(); i != _jobs.end(); ++i) {
                        if (*i == job && last != _jobs.end()) {
                                swap (*i, *last);
                                changed = true;
@@ -307,6 +321,7 @@ JobManager::increase_priority (shared_ptr<Job> job)
        }
 }
 
+
 void
 JobManager::priority_changed ()
 {
@@ -330,9 +345,10 @@ JobManager::priority_changed ()
                }
        }
 
-       emit (boost::bind (boost::ref (JobsReordered)));
+       emit (boost::bind(boost::ref(JobsReordered)));
 }
 
+
 void
 JobManager::decrease_priority (shared_ptr<Job> job)
 {
@@ -340,8 +356,8 @@ JobManager::decrease_priority (shared_ptr<Job> job)
 
        {
                boost::mutex::scoped_lock lm (_mutex);
-               for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
-                       list<shared_ptr<Job> >::iterator next = i;
+               for (auto i = _jobs.begin(); i != _jobs.end(); ++i) {
+                       auto next = i;
                        ++next;
                        if (*i == job && next != _jobs.end()) {
                                swap (*i, *next);
@@ -356,6 +372,7 @@ JobManager::decrease_priority (shared_ptr<Job> job)
        }
 }
 
+
 void
 JobManager::pause ()
 {
@@ -374,6 +391,7 @@ JobManager::pause ()
        _paused = true;
 }
 
+
 void
 JobManager::resume ()
 {
index 461688845c53b2d0dcf767332eb5886d212168a7..4fe1e45d6b337302611d2c500721dfb719df0e88 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @file  src/job_manager.h
  *  @brief A simple scheduler for jobs.
  */
 
+
 #include "signaller.h"
 #include <boost/thread/mutex.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/condition.hpp>
 #include <list>
 
+
 class Job;
 class Film;
 class Playlist;
 class Content;
 struct threed_test7;
 
+
 extern bool wait_for_jobs ();
 
+
 /** @class JobManager
  *  @brief A simple scheduler for jobs.
  */
-class JobManager : public Signaller, public boost::noncopyable
+class JobManager : public Signaller
 {
 public:
+       JobManager (JobManager const&) = delete;
+       JobManager& operator= (JobManager const&) = delete;
+
        std::shared_ptr<Job> add (std::shared_ptr<Job>);
        std::shared_ptr<Job> add_after (std::shared_ptr<Job> after, std::shared_ptr<Job> j);
-       std::list<std::shared_ptr<Job> > get () const;
+       std::list<std::shared_ptr<Job>> get () const;
        bool work_to_do () const;
        bool errors () const;
        void increase_priority (std::shared_ptr<Job>);
@@ -94,10 +102,10 @@ private:
        mutable boost::mutex _mutex;
        boost::condition _empty_condition;
        /** List of jobs in the order that they will be executed */
-       std::list<std::shared_ptr<Job> > _jobs;
+       std::list<std::shared_ptr<Job>> _jobs;
        std::list<boost::signals2::connection> _connections;
-       bool _terminate;
-       bool _paused;
+       bool _terminate = false;
+       bool _paused = false;
        std::shared_ptr<Job> _paused_job;
 
        boost::optional<std::string> _last_active_job;
index 20534e467778b58246e87cb0ec5ab12033cfc09a..e8714e9d6d4ffedac4ab9dd6fc6ae83ee1efe66b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -18,6 +18,7 @@
 
 */
 
+
 #include "playlist.h"
 #include "video_content.h"
 #include "text_content.h"
@@ -39,6 +40,7 @@
 
 #include "i18n.h"
 
+
 using std::list;
 using std::cout;
 using std::vector;
@@ -55,13 +57,13 @@ using namespace dcpomatic;
 using namespace boost::placeholders;
 #endif
 
+
 Playlist::Playlist ()
-       : _sequence (true)
-       , _sequencing (false)
 {
 
 }
 
+
 Playlist::~Playlist ()
 {
        boost::mutex::scoped_lock lm (_mutex);
@@ -69,6 +71,7 @@ Playlist::~Playlist ()
        disconnect ();
 }
 
+
 void
 Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_ptr<Content> content, int property, bool frequent)
 {
@@ -117,6 +120,7 @@ Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_
        ContentChange (type, content, property, frequent);
 }
 
+
 void
 Playlist::maybe_sequence (shared_ptr<const Film> film)
 {
@@ -126,7 +130,7 @@ Playlist::maybe_sequence (shared_ptr<const Film> film)
 
        _sequencing = true;
 
-       ContentList cont = content ();
+       auto cont = content ();
 
        /* Keep track of the content that we've set the position of so that we don't
           do it twice.
@@ -171,6 +175,7 @@ Playlist::maybe_sequence (shared_ptr<const Film> film)
        _sequencing = false;
 }
 
+
 string
 Playlist::video_identifier () const
 {
@@ -193,6 +198,7 @@ Playlist::video_identifier () const
        return digester.get ();
 }
 
+
 /** @param film Film that this Playlist is for.
  *  @param node &lt;Playlist&gt; node.
  *  @param version Metadata version number.
@@ -227,7 +233,7 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
                }
 
                /* ...or have a start trim which is an integer number of frames */
-               ContentTime const old_trim = content->trim_start();
+               auto const old_trim = content->trim_start();
                content->set_trim_start(old_trim);
                if (old_trim != content->trim_start()) {
                        string note = _("Your project contains video content whose trim was not aligned to a frame boundary.");
@@ -255,6 +261,7 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
        reconnect (film);
 }
 
+
 /** @param node &lt;Playlist&gt; node.
  *  @param with_content_paths true to include &lt;Path&gt; nodes in &lt;Content&gt; nodes, false to omit them.
  */
@@ -266,6 +273,7 @@ Playlist::as_xml (xmlpp::Node* node, bool with_content_paths)
        }
 }
 
+
 void
 Playlist::add (shared_ptr<const Film> film, shared_ptr<Content> c)
 {
@@ -283,6 +291,7 @@ Playlist::add (shared_ptr<const Film> film, shared_ptr<Content> c)
        LengthChange ();
 }
 
+
 void
 Playlist::remove (shared_ptr<Content> c)
 {
@@ -316,6 +325,7 @@ Playlist::remove (shared_ptr<Content> c)
        LengthChange ();
 }
 
+
 void
 Playlist::remove (ContentList c)
 {
@@ -325,7 +335,7 @@ Playlist::remove (ContentList c)
                boost::mutex::scoped_lock lm (_mutex);
 
                for (auto i: c) {
-                       ContentList::iterator j = _content.begin ();
+                       auto j = _content.begin ();
                        while (j != _content.end() && *j != i) {
                                ++j;
                        }
@@ -343,6 +353,7 @@ Playlist::remove (ContentList c)
        LengthChange ();
 }
 
+
 class FrameRateCandidate
 {
 public:
@@ -355,6 +366,7 @@ public:
        int dcp;
 };
 
+
 /** @return the best frame rate from Config::_allowed_dcp_frame_rates for the content in this list */
 int
 Playlist::best_video_frame_rate () const
@@ -412,6 +424,7 @@ Playlist::best_video_frame_rate () const
        return best->dcp;
 }
 
+
 /** @return length of the playlist from time 0 to the last thing on the playlist */
 DCPTime
 Playlist::length (shared_ptr<const Film> film) const
@@ -424,6 +437,7 @@ Playlist::length (shared_ptr<const Film> film) const
        return len;
 }
 
+
 /** @return position of the first thing on the playlist, if it's not empty */
 optional<DCPTime>
 Playlist::start () const
@@ -441,6 +455,7 @@ Playlist::start () const
        return start;
 }
 
+
 /** Must be called with a lock held on _mutex */
 void
 Playlist::disconnect ()
@@ -452,6 +467,7 @@ Playlist::disconnect ()
        _content_connections.clear ();
 }
 
+
 /** Must be called with a lock held on _mutex */
 void
 Playlist::reconnect (shared_ptr<const Film> film)
@@ -463,6 +479,7 @@ Playlist::reconnect (shared_ptr<const Film> film)
        }
 }
 
+
 DCPTime
 Playlist::video_end (shared_ptr<const Film> film) const
 {
@@ -476,6 +493,7 @@ Playlist::video_end (shared_ptr<const Film> film) const
        return end;
 }
 
+
 DCPTime
 Playlist::text_end (shared_ptr<const Film> film) const
 {
@@ -489,10 +507,11 @@ Playlist::text_end (shared_ptr<const Film> film) const
        return end;
 }
 
+
 FrameRateChange
 Playlist::active_frame_rate_change (DCPTime t, int dcp_video_frame_rate) const
 {
-       ContentList cont = content ();
+       auto cont = content ();
        for (ContentList::const_reverse_iterator i = cont.rbegin(); i != cont.rend(); ++i) {
                if (!(*i)->video) {
                        continue;
@@ -515,12 +534,14 @@ Playlist::active_frame_rate_change (DCPTime t, int dcp_video_frame_rate) const
        return FrameRateChange (dcp_video_frame_rate, dcp_video_frame_rate);
 }
 
+
 void
 Playlist::set_sequence (bool s)
 {
        _sequence = s;
 }
 
+
 bool
 ContentSorter::operator() (shared_ptr<Content> a, shared_ptr<Content> b)
 {
@@ -539,6 +560,7 @@ ContentSorter::operator() (shared_ptr<Content> a, shared_ptr<Content> b)
        return a->digest() < b->digest();
 }
 
+
 /** @return content in ascending order of position */
 ContentList
 Playlist::content () const
@@ -547,10 +569,11 @@ Playlist::content () const
        return _content;
 }
 
+
 void
 Playlist::repeat (shared_ptr<const Film> film, ContentList c, int n)
 {
-       pair<DCPTime, DCPTime> range (DCPTime::max (), DCPTime ());
+       pair<DCPTime, DCPTime> range (DCPTime::max(), DCPTime());
        for (auto i: c) {
                range.first = min (range.first, i->position ());
                range.second = max (range.second, i->position ());
@@ -580,6 +603,7 @@ Playlist::repeat (shared_ptr<const Film> film, ContentList c, int n)
        Change (ChangeType::DONE);
 }
 
+
 void
 Playlist::move_earlier (shared_ptr<const Film> film, shared_ptr<Content> c)
 {
@@ -603,6 +627,7 @@ Playlist::move_earlier (shared_ptr<const Film> film, shared_ptr<Content> c)
        c->set_position (film, p);
 }
 
+
 void
 Playlist::move_later (shared_ptr<const Film> film, shared_ptr<Content> c)
 {
@@ -627,6 +652,7 @@ Playlist::move_later (shared_ptr<const Film> film, shared_ptr<Content> c)
        c->set_position (film, c->position() + next_c->length_after_trim(film));
 }
 
+
 int64_t
 Playlist::required_disk_space (shared_ptr<const Film> film, int j2k_bandwidth, int audio_channels, int audio_frame_rate) const
 {
@@ -649,6 +675,7 @@ Playlist::required_disk_space (shared_ptr<const Film> film, int j2k_bandwidth, i
        return video + audio + 65536;
 }
 
+
 string
 Playlist::content_summary (shared_ptr<const Film> film, DCPTimePeriod period) const
 {
@@ -674,6 +701,7 @@ Playlist::content_summary (shared_ptr<const Film> film, DCPTimePeriod period) co
        return best_summary;
 }
 
+
 pair<double, double>
 Playlist::speed_up_range (int dcp_video_frame_rate) const
 {
index 91f39bf6b058e54324412e6c5ba670abe46d8b1f..0dd2370a8c6e36c8ba805190a3524c4f06031e6a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_PLAYLIST_H
 #define DCPOMATIC_PLAYLIST_H
 
+
 #include "change_signaller.h"
 #include "frame_rate_change.h"
 #include "util.h"
 #include <boost/thread.hpp>
 #include <list>
 
+
 class Film;
 
+
 struct ContentSorter
 {
        bool operator() (std::shared_ptr<Content> a, std::shared_ptr<Content> b);
 };
 
+
 /** @class Playlist
  *  @brief A set of Content objects with knowledge of how they should be arranged into
  *  a DCP.
  */
-class Playlist : public boost::noncopyable
+class Playlist
 {
 public:
        Playlist ();
        ~Playlist ();
 
+       Playlist (Playlist const&) = delete;
+       Playlist& operator= (Playlist const&) = delete;
+
        void as_xml (xmlpp::Node *, bool with_content_paths);
        void set_from_xml (std::shared_ptr<const Film> film, cxml::ConstNodePtr node, int version, std::list<std::string>& notes);
 
@@ -91,9 +99,10 @@ private:
        mutable boost::mutex _mutex;
        /** List of content.  Kept sorted in position order. */
        ContentList _content;
-       bool _sequence;
-       bool _sequencing;
+       bool _sequence = true;
+       bool _sequencing = false;
        std::list<boost::signals2::connection> _content_connections;
 };
 
+
 #endif
index 93ad5755ddb5fe23abe637a357caee2c88d8d206..5ba79c28b7a8f48ad826a4f33ba608fc98dc4e69 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -18,6 +18,7 @@
 
 */
 
+
 #include "ratio.h"
 #include "util.h"
 #include "config.h"
 
 #include "i18n.h"
 
+
 using std::string;
 using std::vector;
 using boost::optional;
 
+
 vector<Ratio const *> Ratio::_ratios;
 
+
 void
 Ratio::setup_ratios ()
 {
-       _ratios.push_back (new Ratio (float(1290) / 1080, "119", _("1.19"),              optional<string>(),      "119"));
-       _ratios.push_back (new Ratio (float(1440) / 1080, "133", _("1.33 (4:3)"),        optional<string>(),      "133"));
-       _ratios.push_back (new Ratio (float(1485) / 1080, "138", _("1.38 (Academy)"),    optional<string>(),      "137"));
-       _ratios.push_back (new Ratio (float(1544) / 1080, "143", _("1.43 (IMAX)"),       optional<string>(),      "143"));
-       _ratios.push_back (new Ratio (float(1800) / 1080, "166", _("1.66"),              optional<string>(),      "166"));
-       _ratios.push_back (new Ratio (float(1920) / 1080, "178", _("1.78 (16:9 or HD)"), optional<string>(),      "178"));
-       _ratios.push_back (new Ratio (float(1998) / 1080, "185", _("1.85 (Flat)"),       string(_("DCI Flat")),   "F"));
-       _ratios.push_back (new Ratio (float(2048) /  872, "235", _("2.35 (35mm Scope)"), optional<string>(),      "S"));
-       _ratios.push_back (new Ratio (float(2048) /  858, "239", _("2.39 (Scope)"),      string(_("DCI Scope")),  "S"));
-       _ratios.push_back (new Ratio (float(2048) / 1080, "190", _("1.90 (Full frame)"), string(_("Full frame")), "C"));
+       _ratios.push_back (new Ratio(float(1290) / 1080, "119", _("1.19"),              optional<string>(),      "119"));
+       _ratios.push_back (new Ratio(float(1440) / 1080, "133", _("1.33 (4:3)"),        optional<string>(),      "133"));
+       _ratios.push_back (new Ratio(float(1485) / 1080, "138", _("1.38 (Academy)"),    optional<string>(),      "137"));
+       _ratios.push_back (new Ratio(float(1544) / 1080, "143", _("1.43 (IMAX)"),       optional<string>(),      "143"));
+       _ratios.push_back (new Ratio(float(1800) / 1080, "166", _("1.66"),              optional<string>(),      "166"));
+       _ratios.push_back (new Ratio(float(1920) / 1080, "178", _("1.78 (16:9 or HD)"), optional<string>(),      "178"));
+       _ratios.push_back (new Ratio(float(1998) / 1080, "185", _("1.85 (Flat)"),       string(_("DCI Flat")),   "F"));
+       _ratios.push_back (new Ratio(float(2048) /  872, "235", _("2.35 (35mm Scope)"), optional<string>(),      "S"));
+       _ratios.push_back (new Ratio(float(2048) /  858, "239", _("2.39 (Scope)"),      string(_("DCI Scope")),  "S"));
+       _ratios.push_back (new Ratio(float(2048) / 1080, "190", _("1.90 (Full frame)"), string(_("Full frame")), "C"));
 }
 
+
 Ratio const *
 Ratio::from_id (string i)
 {
@@ -55,7 +60,7 @@ Ratio::from_id (string i)
                i = "138";
        }
 
-       vector<Ratio const *>::iterator j = _ratios.begin ();
+       auto j = _ratios.begin ();
        while (j != _ratios.end() && (*j)->id() != i) {
                ++j;
        }
@@ -67,30 +72,32 @@ Ratio::from_id (string i)
        return *j;
 }
 
+
 /** @return Ratio corresponding to a given fractional ratio (+/- 0.01), or 0 */
 Ratio const *
 Ratio::from_ratio (float r)
 {
-       vector<Ratio const *>::iterator j = _ratios.begin ();
-       while (j != _ratios.end() && fabs ((*j)->ratio() - r) > 0.01) {
+       auto j = _ratios.begin ();
+       while (j != _ratios.end() && fabs((*j)->ratio() - r) > 0.01) {
                ++j;
        }
 
        if (j == _ratios.end ()) {
-               return 0;
+               return nullptr;
        }
 
        return *j;
 }
 
+
 Ratio const *
 Ratio::nearest_from_ratio (float r)
 {
-       Ratio const * nearest = 0;
+       Ratio const * nearest = nullptr;
        float distance = FLT_MAX;
 
-       for (vector<Ratio const *>::iterator i = _ratios.begin (); i != _ratios.end(); ++i) {
-               float const d = fabs ((*i)->ratio() - r);
+       for (auto i = _ratios.begin(); i != _ratios.end(); ++i) {
+               float const d = fabs((*i)->ratio() - r);
                if (d < distance) {
                        distance = d;
                        nearest = *i;
@@ -113,6 +120,7 @@ Ratio::containers ()
        return r;
 }
 
+
 string
 Ratio::container_nickname () const
 {
index 40f596ab8ea6dd1f3d0aa6a9c9bb6e7b69d4428d..016a22edca438460a13ccdb8e249ebb33b9cadcb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_RATIO_H
 #define DCPOMATIC_RATIO_H
 
+
 #include <dcp/util.h>
 #include <boost/utility.hpp>
 #include <vector>
 
+
 /** @class Ratio
  *  @brief Description of an image ratio.
  */
-class Ratio : public boost::noncopyable
+class Ratio
 {
 public:
        Ratio (float ratio, std::string id, std::string in, boost::optional<std::string> cn, std::string d)
@@ -39,6 +42,9 @@ public:
                , _isdcf_name (d)
        {}
 
+       Ratio (Ratio const&) = delete;
+       Ratio& operator= (Ratio const&) = delete;
+
        std::string id () const {
                return _id;
        }
@@ -50,7 +56,7 @@ public:
        std::string container_nickname () const;
 
        bool used_for_container () const {
-               return static_cast<bool> (_container_nickname);
+               return static_cast<bool>(_container_nickname);
        }
 
        std::string isdcf_name () const {
@@ -85,4 +91,5 @@ private:
        static std::vector<Ratio const *> _ratios;
 };
 
+
 #endif
index 7815541d277b809dce2381bc20e71f23727c15e0..559853c40bbd503a80e3ccda419acbffc5a4c3f9 100644 (file)
@@ -102,7 +102,6 @@ DCPOMATIC_ENABLE_WARNINGS
 #include <shellapi.h>
 #endif
 #include <boost/filesystem.hpp>
-#include <boost/noncopyable.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 #include <fstream>
@@ -135,7 +134,7 @@ using namespace boost::placeholders;
 #endif
 using dcp::raw_convert;
 
-class FilmChangedClosingDialog : public boost::noncopyable
+class FilmChangedClosingDialog
 {
 public:
        explicit FilmChangedClosingDialog (string name)
@@ -159,6 +158,9 @@ public:
                _dialog->Destroy ();
        }
 
+       FilmChangedClosingDialog (FilmChangedClosingDialog const&) = delete;
+       FilmChangedClosingDialog& operator= (FilmChangedClosingDialog const&) = delete;
+
        int run ()
        {
                return _dialog->ShowModal ();
@@ -168,7 +170,8 @@ private:
        wxMessageDialog* _dialog;
 };
 
-class FilmChangedDuplicatingDialog : public boost::noncopyable
+
+class FilmChangedDuplicatingDialog
 {
 public:
        explicit FilmChangedDuplicatingDialog (string name)
@@ -192,6 +195,9 @@ public:
                _dialog->Destroy ();
        }
 
+       FilmChangedDuplicatingDialog (FilmChangedDuplicatingDialog const&) = delete;
+       FilmChangedDuplicatingDialog& operator= (FilmChangedDuplicatingDialog const&) = delete;
+
        int run ()
        {
                return _dialog->ShowModal ();
index 1a9c85dde762f9cec226714ea96a3f78156c4897..2a2bc9cf7549779621effe09ca75f15902a7b565 100644 (file)
@@ -43,7 +43,7 @@
  *  @param V Data type of state as used by the view.
  */
 template <class S, class T, typename U, typename V>
-class ContentWidget : public boost::noncopyable
+class ContentWidget
 {
 public:
        /** @param parent Parent window.
@@ -84,6 +84,9 @@ public:
                _button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ContentWidget::button_clicked, this));
        }
 
+       ContentWidget (ContentWidget const&) = delete;
+       ContentWidget& operator= (ContentWidget const&) = delete;
+
        /** @return the widget that we are wrapping */
        T* wrapped () const
        {
index fb23fa7b15a896fe220d068688b91b47cd696ece..10d6dc5beb9d1e4f4d9cf9e1d584ca5c629ce7e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "timeline_view.h"
 #include "timeline.h"
 
+
 using std::list;
 using namespace dcpomatic;
 
+
 /** @class TimelineView
  *  @brief Parent class for components of the timeline (e.g. a piece of content or an axis).
  */
@@ -33,22 +36,25 @@ TimelineView::TimelineView (Timeline& t)
 
 }
 
+
 void
-TimelineView::paint (wxGraphicsContext* g, list<dcpomatic::Rect<int> > overlaps)
+TimelineView::paint (wxGraphicsContext* g, list<dcpomatic::Rect<int>> overlaps)
 {
        _last_paint_bbox = bbox ();
        do_paint (g, overlaps);
 }
 
+
 void
 TimelineView::force_redraw ()
 {
-       _timeline.force_redraw (_last_paint_bbox.extended (4));
-       _timeline.force_redraw (bbox().extended (4));
+       _timeline.force_redraw (_last_paint_bbox.extended(4));
+       _timeline.force_redraw (bbox().extended(4));
 }
 
+
 int
 TimelineView::time_x (DCPTime t) const
 {
-       return t.seconds() * _timeline.pixels_per_second().get_value_or (0);
+       return t.seconds() * _timeline.pixels_per_second().get_value_or(0);
 }
index bfd1de8b752a9e7fb84915355484c87a9d2f8265..c40cf78ff2b1469743d22b8756ad10bee9cab079 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_TIMELINE_VIEW_H
 #define DCPOMATIC_TIMELINE_VIEW_H
 
+
 #include "lib/rect.h"
 #include "lib/dcpomatic_time.h"
-#include <boost/noncopyable.hpp>
+
 
 class wxGraphicsContext;
 class Timeline;
 
+
 /** @class TimelineView
  *  @brief Parent class for components of the timeline (e.g. a piece of content or an axis).
  */
-class TimelineView : public boost::noncopyable
+class TimelineView
 {
 public:
        explicit TimelineView (Timeline& t);
        virtual ~TimelineView () {}
 
+       TimelineView (TimelineView const&) = delete;
+       TimelineView& operator= (TimelineView const&) = delete;
+
        void paint (wxGraphicsContext* g, std::list<dcpomatic::Rect<int> > overlaps);
        void force_redraw ();
 
@@ -53,6 +59,8 @@ private:
        dcpomatic::Rect<int> _last_paint_bbox;
 };
 
-typedef std::vector<std::shared_ptr<TimelineView> > TimelineViewList;
+
+typedef std::vector<std::shared_ptr<TimelineView>> TimelineViewList;
+
 
 #endif
index 68a15e2e0dfc2663d4a6f14d624278a05315378e..5f44c37d61779db3cced384221af5fdba9289506 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2019-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -18,6 +18,7 @@
 
 */
 
+
 #include "video_view.h"
 #include "wx_util.h"
 #include "film_viewer.h"
@@ -29,19 +30,15 @@ using std::pair;
 using std::shared_ptr;
 using boost::optional;
 
+
 VideoView::VideoView (FilmViewer* viewer)
        : _viewer (viewer)
        , _state_timer ("viewer")
-       , _video_frame_rate (0)
-       , _eyes (Eyes::LEFT)
-       , _three_d (false)
-       , _dropped (0)
-       , _errored (0)
-       , _gets (0)
 {
 
 }
 
+
 void
 VideoView::clear ()
 {
@@ -50,6 +47,7 @@ VideoView::clear ()
        _player_video.second = dcpomatic::DCPTime ();
 }
 
+
 /** Could be called from any thread.
  *  @param non_blocking true to return false quickly if no video is available quickly.
  *  @return FAIL if there's no frame, AGAIN if the method should be called again, or SUCCESS
@@ -94,12 +92,14 @@ VideoView::get_next_frame (bool non_blocking)
        return SUCCESS;
 }
 
+
 dcpomatic::DCPTime
 VideoView::one_video_frame () const
 {
        return dcpomatic::DCPTime::from_frames (1, video_frame_rate());
 }
 
+
 /** @return Time in ms until the next frame is due, or empty if nothing is due */
 optional<int>
 VideoView::time_until_next_frame () const
@@ -117,6 +117,7 @@ VideoView::time_until_next_frame () const
        return (next.seconds() - time.seconds()) * 1000;
 }
 
+
 void
 VideoView::start ()
 {
@@ -125,6 +126,7 @@ VideoView::start ()
        _errored = 0;
 }
 
+
 bool
 VideoView::reset_metadata (shared_ptr<const Film> film, dcp::Size player_video_container_size)
 {
index 3b596197e42c82bca0bbeab977752a51f2f9ba37..d3a15d38c3e9573a252acecf49134333120be24a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2019-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_VIDEO_VIEW_H
 #define DCPOMATIC_VIDEO_VIEW_H
 
+
 #include "lib/dcpomatic_time.h"
 #include "lib/timer.h"
 #include "lib/types.h"
 #include "lib/exception_store.h"
 #include <boost/signals2.hpp>
 #include <boost/thread.hpp>
-#include <boost/noncopyable.hpp>
+
 
 class Image;
 class wxWindow;
@@ -35,12 +37,16 @@ class FilmViewer;
 class Player;
 class PlayerVideo;
 
-class VideoView : public ExceptionStore, public boost::noncopyable
+
+class VideoView : public ExceptionStore
 {
 public:
        VideoView (FilmViewer* viewer);
        virtual ~VideoView () {}
 
+       VideoView (VideoView const&) = delete;
+       VideoView& operator= (VideoView const&) = delete;
+
        /** @return the thing displaying the image */
        virtual wxWindow* get () const = 0;
        /** Re-make and display the image from the current _player_video */
@@ -156,15 +162,16 @@ private:
        mutable boost::mutex _mutex;
 
        std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> _player_video;
-       int _video_frame_rate;
+       int _video_frame_rate = 0;
        /** length of the film we are playing, or 0 if there is none */
        dcpomatic::DCPTime _length;
-       Eyes _eyes;
-       bool _three_d;
+       Eyes _eyes = Eyes::LEFT;
+       bool _three_d = false;
 
-       int _dropped;
-       int _errored;
-       int _gets;
+       int _dropped = 0;
+       int _errored = 0;
+       int _gets = 0;
 };
 
+
 #endif