diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-11-05 00:43:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-11-05 00:43:00 +0100 |
| commit | 5d1496fa502655d334439b4b2658625a2b3c1b70 (patch) | |
| tree | defaa6e2074a4e3fd93dae5c3899c51a12866a65 /src/lib | |
| parent | d50c23b8ddc05953322d2d0eb6ca5cb8ad88645f (diff) | |
C++11 tidying.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/audio_content.cc | 2 | ||||
| -rw-r--r-- | src/lib/audio_ring_buffers.h | 2 | ||||
| -rw-r--r-- | src/lib/check_content_change_job.cc | 16 | ||||
| -rw-r--r-- | src/lib/cinema.h | 2 | ||||
| -rw-r--r-- | src/lib/config.h | 8 | ||||
| -rw-r--r-- | src/lib/cross.h | 2 | ||||
| -rw-r--r-- | src/lib/ffmpeg_decoder.h | 2 | ||||
| -rw-r--r-- | src/lib/ffmpeg_encoder.h | 2 | ||||
| -rw-r--r-- | src/lib/player.h | 4 | ||||
| -rw-r--r-- | src/lib/render_text.h | 2 | ||||
| -rw-r--r-- | src/lib/send_kdm_email_job.cc | 2 | ||||
| -rw-r--r-- | src/lib/subtitle_encoder.h | 2 | ||||
| -rw-r--r-- | src/lib/text_content.h | 4 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 2 |
14 files changed, 28 insertions, 24 deletions
diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc index 748cbb7d0..f2510b494 100644 --- a/src/lib/audio_content.cc +++ b/src/lib/audio_content.cc @@ -98,7 +98,7 @@ AudioContent::AudioContent (Content* parent, cxml::ConstNodePtr node) } -AudioContent::AudioContent (Content* parent, vector<shared_ptr<Content> > c) +AudioContent::AudioContent (Content* parent, vector<shared_ptr<Content>> c) : ContentPart (parent) { auto ref = c[0]->audio; diff --git a/src/lib/audio_ring_buffers.h b/src/lib/audio_ring_buffers.h index 4c90ed791..6fb84e0d7 100644 --- a/src/lib/audio_ring_buffers.h +++ b/src/lib/audio_ring_buffers.h @@ -48,7 +48,7 @@ public: private: mutable boost::mutex _mutex; - std::list<std::pair<std::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime> > _buffers; + std::list<std::pair<std::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime>> _buffers; int _used_in_head = 0; }; diff --git a/src/lib/check_content_change_job.cc b/src/lib/check_content_change_job.cc index c4d050c0e..216cf3e51 100644 --- a/src/lib/check_content_change_job.cc +++ b/src/lib/check_content_change_job.cc @@ -18,19 +18,23 @@ */ + #include "check_content_change_job.h" -#include "job_manager.h" -#include "examine_content_job.h" #include "content.h" +#include "examine_content_job.h" #include "film.h" +#include "job_manager.h" #include <iostream> #include "i18n.h" -using std::string; -using std::list; + using std::cout; +using std::list; +using std::make_shared; using std::shared_ptr; +using std::string; + /** @param gui true if we are running this job from the GUI, false if it's the CLI */ CheckContentChangeJob::CheckContentChangeJob (shared_ptr<const Film> film, shared_ptr<Job> following, bool gui) @@ -63,7 +67,7 @@ CheckContentChangeJob::run () { set_progress_unknown (); - list<shared_ptr<Content> > changed; + list<shared_ptr<Content>> changed; for (auto i: _film->content()) { bool ic = false; @@ -84,7 +88,7 @@ CheckContentChangeJob::run () if (!changed.empty()) { if (_gui) { for (auto i: changed) { - JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob(_film, i))); + JobManager::instance()->add(make_shared<ExamineContentJob>(_film, i)); } string m = _("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings."); if (_following) { diff --git a/src/lib/cinema.h b/src/lib/cinema.h index a89408f3f..c17454db9 100644 --- a/src/lib/cinema.h +++ b/src/lib/cinema.h @@ -76,7 +76,7 @@ public: return _utc_offset_minute; } - std::list<std::shared_ptr<dcpomatic::Screen> > screens () const { + std::list<std::shared_ptr<dcpomatic::Screen>> screens () const { return _screens; } diff --git a/src/lib/config.h b/src/lib/config.h index c9206b139..d927b3b19 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -140,11 +140,11 @@ public: return _tms_password; } - std::list<std::shared_ptr<Cinema> > cinemas () const { + std::list<std::shared_ptr<Cinema>> cinemas () const { return _cinemas; } - std::list<std::shared_ptr<DKDMRecipient> > dkdm_recipients () const { + std::list<std::shared_ptr<DKDMRecipient>> dkdm_recipients () const { return _dkdm_recipients; } @@ -1194,8 +1194,8 @@ private: */ boost::optional<boost::filesystem::path> _default_kdm_directory; bool _upload_after_make_dcp; - std::list<std::shared_ptr<Cinema> > _cinemas; - std::list<std::shared_ptr<DKDMRecipient> > _dkdm_recipients; + std::list<std::shared_ptr<Cinema>> _cinemas; + std::list<std::shared_ptr<DKDMRecipient>> _dkdm_recipients; std::string _mail_server; int _mail_port; EmailProtocol _mail_protocol; diff --git a/src/lib/cross.h b/src/lib/cross.h index ed1d0c8e7..1f06822b0 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -43,7 +43,7 @@ extern void dcpomatic_sleep_seconds (int); extern void dcpomatic_sleep_milliseconds (int); extern std::string cpu_info (); extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path); -extern std::list<std::pair<std::string, std::string> > mount_info (); +extern std::list<std::pair<std::string, std::string>> mount_info (); extern boost::filesystem::path openssl_path (); extern void make_foreground_application (); #ifdef DCPOMATIC_DISK diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index fce3fcae9..264733c70 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -71,7 +71,7 @@ private: void maybe_add_subtitle (); - std::list<std::shared_ptr<VideoFilterGraph> > _filter_graphs; + std::list<std::shared_ptr<VideoFilterGraph>> _filter_graphs; boost::mutex _filter_graphs_mutex; dcpomatic::ContentTime _pts_offset; diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h index f450c8022..393a6d72e 100644 --- a/src/lib/ffmpeg_encoder.h +++ b/src/lib/ffmpeg_encoder.h @@ -73,7 +73,7 @@ private: void audio (std::shared_ptr<AudioBuffers>); private: - std::map<Eyes, std::shared_ptr<FFmpegFileEncoder> > _encoders; + std::map<Eyes, std::shared_ptr<FFmpegFileEncoder>> _encoders; }; int _output_audio_channels; diff --git a/src/lib/player.h b/src/lib/player.h index 51c30e864..14fb8d0ee 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -174,7 +174,7 @@ private: /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */ boost::atomic<int> _suspended; - std::list<std::shared_ptr<Piece> > _pieces; + std::list<std::shared_ptr<Piece>> _pieces; /** Size of the image we are rendering to; this may be the DCP frame size, or * the size of preview in a window. @@ -208,7 +208,7 @@ private: AudioMerger _audio_merger; std::unique_ptr<Shuffler> _shuffler; - std::list<std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> > _delay; + std::list<std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime>> _delay; class StreamState { diff --git a/src/lib/render_text.h b/src/lib/render_text.h index 07a97bb40..b7846654b 100644 --- a/src/lib/render_text.h +++ b/src/lib/render_text.h @@ -29,5 +29,5 @@ namespace dcpomatic { std::string marked_up (std::list<StringText> subtitles, int target_height, float fade_factor, std::string font_name); std::list<PositionImage> render_text ( - std::list<StringText>, std::list<std::shared_ptr<dcpomatic::Font> > fonts, dcp::Size, dcpomatic::DCPTime, int + std::list<StringText>, std::list<std::shared_ptr<dcpomatic::Font>> fonts, dcp::Size, dcpomatic::DCPTime, int ); diff --git a/src/lib/send_kdm_email_job.cc b/src/lib/send_kdm_email_job.cc index 67ddd0eef..a0d65508d 100644 --- a/src/lib/send_kdm_email_job.cc +++ b/src/lib/send_kdm_email_job.cc @@ -60,7 +60,7 @@ SendKDMEmailJob::SendKDMEmailJob ( * @param cpl_name Name of the CPL that the KDMs are for. */ SendKDMEmailJob::SendKDMEmailJob ( - list<list<KDMWithMetadataPtr> > kdms, + list<list<KDMWithMetadataPtr>> kdms, dcp::NameFormat container_name_format, dcp::NameFormat filename_format, string cpl_name diff --git a/src/lib/subtitle_encoder.h b/src/lib/subtitle_encoder.h index b43cc2683..a10e4ba47 100644 --- a/src/lib/subtitle_encoder.h +++ b/src/lib/subtitle_encoder.h @@ -54,7 +54,7 @@ public: private: void text (PlayerText subs, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period); - std::vector<std::pair<std::shared_ptr<dcp::SubtitleAsset>, boost::filesystem::path> > _assets; + std::vector<std::pair<std::shared_ptr<dcp::SubtitleAsset>, boost::filesystem::path>> _assets; std::vector<dcpomatic::DCPTimePeriod> _reels; bool _split_reels; bool _include_font; diff --git a/src/lib/text_content.h b/src/lib/text_content.h index d3e9b564b..66bedecf5 100644 --- a/src/lib/text_content.h +++ b/src/lib/text_content.h @@ -132,7 +132,7 @@ public: return _y_scale; } - std::list<std::shared_ptr<dcpomatic::Font> > fonts () const { + std::list<std::shared_ptr<dcpomatic::Font>> fonts () const { boost::mutex::scoped_lock lm (_mutex); return _fonts; } @@ -221,7 +221,7 @@ private: double _x_scale; /** y scale factor to apply to subtitles */ double _y_scale; - std::list<std::shared_ptr<dcpomatic::Font> > _fonts; + std::list<std::shared_ptr<dcpomatic::Font>> _fonts; boost::optional<dcp::Colour> _colour; boost::optional<dcp::Effect> _effect; boost::optional<dcp::Colour> _effect_colour; diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 9ff35ffdf..c6574fce3 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -196,7 +196,7 @@ VideoContent::VideoContent (Content* parent, cxml::ConstNodePtr node, int versio } -VideoContent::VideoContent (Content* parent, vector<shared_ptr<Content> > c) +VideoContent::VideoContent (Content* parent, vector<shared_ptr<Content>> c) : ContentPart (parent) , _length (0) , _yuv (false) |
