From c6871fe8617b3de03662b7630355059393bf8043 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 27 Feb 2018 15:34:45 +0000 Subject: [PATCH] Add a load of explicit keywords. --- src/lib/audio_analysis.h | 4 ++-- src/lib/audio_buffers.h | 2 +- src/lib/audio_content.h | 2 +- src/lib/audio_delay.h | 2 +- src/lib/audio_filter.h | 2 +- src/lib/audio_merger.h | 2 +- src/lib/audio_point.h | 2 +- src/lib/cinema.h | 2 +- src/lib/colour_conversion.h | 2 +- src/lib/content.h | 2 +- src/lib/content_part.h | 3 ++- src/lib/content_subtitle.h | 2 +- src/lib/dcp.h | 2 +- src/lib/dcp_examiner.h | 2 +- src/lib/dcpomatic_socket.h | 2 +- src/lib/dkdm_wrapper.h | 4 ++-- src/lib/event_history.h | 2 +- src/lib/exceptions.h | 20 ++++++++++---------- src/lib/ffmpeg.h | 2 +- src/lib/ffmpeg_stream.h | 2 +- src/lib/ffmpeg_subtitle_period.h | 2 +- src/lib/file_group.h | 4 ++-- src/lib/file_log.h | 2 +- src/lib/film.h | 2 +- src/lib/font.h | 4 ++-- src/lib/image.h | 4 ++-- src/lib/isdcf_metadata.h | 2 +- src/lib/job.h | 2 +- src/lib/json_server.h | 2 +- src/lib/log_entry.h | 2 +- src/lib/magick_image_proxy.h | 2 +- src/lib/raw_image_proxy.h | 2 +- src/lib/rgba.h | 2 +- src/lib/screen.h | 2 +- src/lib/signaller.h | 2 +- src/lib/subtitle_content.h | 2 +- src/lib/subtitle_string.h | 2 +- src/lib/text_subtitle.h | 2 +- src/lib/timer.h | 2 +- src/lib/transcode_job.h | 2 +- src/lib/types.h | 2 +- src/lib/upload_job.h | 2 +- src/lib/upmixer_a.h | 2 +- src/lib/upmixer_b.h | 2 +- src/lib/video_content.h | 2 +- src/lib/video_content_scale.h | 6 +++--- src/lib/video_mxf_examiner.h | 2 +- src/tools/dcpomatic.cc | 6 +++--- src/tools/dcpomatic_batch.cc | 4 ++-- src/tools/dcpomatic_kdm.cc | 2 +- src/wx/about_dialog.h | 3 +-- src/wx/audio_mapping_view.h | 2 +- src/wx/audio_panel.h | 2 +- src/wx/audio_plot.h | 2 +- src/wx/content_menu.h | 2 +- src/wx/dir_picker_ctrl.h | 2 +- src/wx/download_certificate_dialog.h | 2 +- src/wx/email_dialog.h | 2 +- src/wx/export_dialog.h | 2 +- src/wx/gain_calculator_dialog.h | 2 +- src/wx/image_sequence_dialog.h | 2 +- src/wx/kdm_timing_panel.h | 2 +- src/wx/new_dkdm_folder_dialog.h | 2 +- src/wx/rename_template_dialog.h | 2 +- src/wx/repeat_dialog.h | 2 +- src/wx/save_template_dialog.h | 2 +- src/wx/screen_dialog.cc | 2 +- src/wx/screens_panel.h | 2 +- src/wx/server_dialog.h | 2 +- src/wx/servers_list_dialog.h | 2 +- src/wx/subtitle_panel.h | 2 +- src/wx/system_font_dialog.h | 2 +- src/wx/templates_dialog.h | 2 +- src/wx/timeline_labels_view.h | 2 +- src/wx/timeline_view.h | 2 +- src/wx/video_panel.h | 2 +- src/wx/wx_signal_manager.h | 2 +- test/job_test.cc | 2 +- 78 files changed, 98 insertions(+), 98 deletions(-) diff --git a/src/lib/audio_analysis.h b/src/lib/audio_analysis.h index a8ef4fb2d..6da651c95 100644 --- a/src/lib/audio_analysis.h +++ b/src/lib/audio_analysis.h @@ -37,8 +37,8 @@ class Playlist; class AudioAnalysis : public boost::noncopyable { public: - AudioAnalysis (int c); - AudioAnalysis (boost::filesystem::path); + explicit AudioAnalysis (int c); + explicit AudioAnalysis (boost::filesystem::path); void add_point (int c, AudioPoint const & p); diff --git a/src/lib/audio_buffers.h b/src/lib/audio_buffers.h index f4a0c1f1c..64ad4ba95 100644 --- a/src/lib/audio_buffers.h +++ b/src/lib/audio_buffers.h @@ -40,7 +40,7 @@ class AudioBuffers public: AudioBuffers (int channels, int32_t frames); AudioBuffers (AudioBuffers const &); - AudioBuffers (boost::shared_ptr); + explicit AudioBuffers (boost::shared_ptr); ~AudioBuffers (); AudioBuffers & operator= (AudioBuffers const &); diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h index e582bca20..a1f5ba8a0 100644 --- a/src/lib/audio_content.h +++ b/src/lib/audio_content.h @@ -43,7 +43,7 @@ public: class AudioContent : public ContentPart { public: - AudioContent (Content* parent); + explicit AudioContent (Content* parent); AudioContent (Content* parent, std::vector >); void as_xml (xmlpp::Node *) const; diff --git a/src/lib/audio_delay.h b/src/lib/audio_delay.h index 644ca1fb4..22be33478 100644 --- a/src/lib/audio_delay.h +++ b/src/lib/audio_delay.h @@ -25,7 +25,7 @@ class AudioBuffers; class AudioDelay { public: - AudioDelay (int samples); + explicit AudioDelay (int samples); boost::shared_ptr run (boost::shared_ptr in); void flush (); diff --git a/src/lib/audio_filter.h b/src/lib/audio_filter.h index b6b75cbb0..fb7b7b92c 100644 --- a/src/lib/audio_filter.h +++ b/src/lib/audio_filter.h @@ -32,7 +32,7 @@ struct audio_filter_impulse_input_test; class AudioFilter { public: - AudioFilter (float transition_bandwidth) + explicit AudioFilter (float transition_bandwidth) : _ir (0) { _M = 4 / transition_bandwidth; diff --git a/src/lib/audio_merger.h b/src/lib/audio_merger.h index 6c9d87097..dbc0c8691 100644 --- a/src/lib/audio_merger.h +++ b/src/lib/audio_merger.h @@ -31,7 +31,7 @@ class AudioMerger { public: - AudioMerger (int frame_rate); + explicit AudioMerger (int frame_rate); std::list, DCPTime> > pull (DCPTime time); void push (boost::shared_ptr audio, DCPTime time); diff --git a/src/lib/audio_point.h b/src/lib/audio_point.h index cc5e4943d..91f0cb0e9 100644 --- a/src/lib/audio_point.h +++ b/src/lib/audio_point.h @@ -37,7 +37,7 @@ public: }; AudioPoint (); - AudioPoint (cxml::ConstNodePtr node); + explicit AudioPoint (cxml::ConstNodePtr node); AudioPoint (AudioPoint const &); AudioPoint& operator= (AudioPoint const &); diff --git a/src/lib/cinema.h b/src/lib/cinema.h index 3cb17502b..6a3d89845 100644 --- a/src/lib/cinema.h +++ b/src/lib/cinema.h @@ -48,7 +48,7 @@ public: , _utc_offset_minute (utc_offset_minute) {} - Cinema (cxml::ConstNodePtr); + explicit Cinema (cxml::ConstNodePtr); void read_screens (cxml::ConstNodePtr); diff --git a/src/lib/colour_conversion.h b/src/lib/colour_conversion.h index 90405f282..73b6ad23c 100644 --- a/src/lib/colour_conversion.h +++ b/src/lib/colour_conversion.h @@ -37,7 +37,7 @@ class ColourConversion : public dcp::ColourConversion { public: ColourConversion (); - ColourConversion (dcp::ColourConversion); + explicit ColourConversion (dcp::ColourConversion); ColourConversion (cxml::NodePtr, int version); virtual ~ColourConversion () {} diff --git a/src/lib/content.h b/src/lib/content.h index 836a3bd77..ea764907a 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -63,7 +63,7 @@ public: class Content : public boost::enable_shared_from_this, public Signaller, public boost::noncopyable { public: - Content (boost::shared_ptr); + explicit Content (boost::shared_ptr); Content (boost::shared_ptr, DCPTime); Content (boost::shared_ptr, boost::filesystem::path); Content (boost::shared_ptr, cxml::ConstNodePtr); diff --git a/src/lib/content_part.h b/src/lib/content_part.h index d3b9b310d..4f6e9e396 100644 --- a/src/lib/content_part.h +++ b/src/lib/content_part.h @@ -1,3 +1,4 @@ + /* Copyright (C) 2016 Carl Hetherington @@ -31,7 +32,7 @@ class Film; class ContentPart { public: - ContentPart (Content* parent) + explicit ContentPart (Content* parent) : _parent (parent) {} diff --git a/src/lib/content_subtitle.h b/src/lib/content_subtitle.h index 8751d56cb..f834fe197 100644 --- a/src/lib/content_subtitle.h +++ b/src/lib/content_subtitle.h @@ -32,7 +32,7 @@ class Image; class ContentSubtitle { public: - ContentSubtitle (ContentTime f) + explicit ContentSubtitle (ContentTime f) : _from (f) {} diff --git a/src/lib/dcp.h b/src/lib/dcp.h index e2e83e96e..575bcc803 100644 --- a/src/lib/dcp.h +++ b/src/lib/dcp.h @@ -33,7 +33,7 @@ public: std::list > cpls () const; protected: - DCP (boost::shared_ptr content) + explicit DCP (boost::shared_ptr content) : _dcp_content (content) {} diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index d9c372c3c..aaeec6d32 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -31,7 +31,7 @@ class DCPContent; class DCPExaminer : public DCP, public VideoExaminer, public AudioExaminer { public: - DCPExaminer (boost::shared_ptr); + explicit DCPExaminer (boost::shared_ptr); boost::optional video_frame_rate () const { return _video_frame_rate; diff --git a/src/lib/dcpomatic_socket.h b/src/lib/dcpomatic_socket.h index fa5250a1a..6f7c05e22 100644 --- a/src/lib/dcpomatic_socket.h +++ b/src/lib/dcpomatic_socket.h @@ -30,7 +30,7 @@ class Socket : public boost::noncopyable { public: - Socket (int timeout = 30); + explicit Socket (int timeout = 30); /** @return Our underlying socket */ boost::asio::ip::tcp::socket& socket () { diff --git a/src/lib/dkdm_wrapper.h b/src/lib/dkdm_wrapper.h index 0c8b5fbfd..09e9d25c4 100644 --- a/src/lib/dkdm_wrapper.h +++ b/src/lib/dkdm_wrapper.h @@ -52,7 +52,7 @@ private: class DKDM : public DKDMBase { public: - DKDM (dcp::EncryptedKDM k) + explicit DKDM (dcp::EncryptedKDM k) : _dkdm (k) {} @@ -70,7 +70,7 @@ private: class DKDMGroup : public DKDMBase { public: - DKDMGroup (std::string name) + explicit DKDMGroup (std::string name) : _name (name) {} diff --git a/src/lib/event_history.h b/src/lib/event_history.h index f723591fb..e194f6333 100644 --- a/src/lib/event_history.h +++ b/src/lib/event_history.h @@ -27,7 +27,7 @@ class EventHistory { public: - EventHistory (int size); + explicit EventHistory (int size); float rate () const; void event (); diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 08cbcb1d6..5efb045b7 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -39,7 +39,7 @@ extern "C" { class DecodeError : public std::runtime_error { public: - DecodeError (std::string s) + explicit DecodeError (std::string s) : std::runtime_error (s) {} }; @@ -50,7 +50,7 @@ public: class EncodeError : public std::runtime_error { public: - EncodeError (std::string s) + explicit EncodeError (std::string s) : std::runtime_error (s) {} }; @@ -84,7 +84,7 @@ private: class JoinError : public std::runtime_error { public: - JoinError (std::string s) + explicit JoinError (std::string s) : std::runtime_error (s) {} }; @@ -158,7 +158,7 @@ class MissingSettingError : public SettingError { public: /** @param s Name of setting that was required */ - MissingSettingError (std::string s); + explicit MissingSettingError (std::string s); }; /** @class BadSettingError @@ -181,7 +181,7 @@ public: class NetworkError : public std::runtime_error { public: - NetworkError (std::string s) + explicit NetworkError (std::string s) : std::runtime_error (s) {} }; @@ -192,7 +192,7 @@ public: class KDMError : public std::runtime_error { public: - KDMError (std::string s) + explicit KDMError (std::string s) : std::runtime_error (s) {} }; @@ -218,7 +218,7 @@ public: class DCPError : public std::runtime_error { public: - DCPError (std::string s) + explicit DCPError (std::string s) : std::runtime_error (s) {} }; @@ -227,7 +227,7 @@ class InvalidSignerError : public std::runtime_error { public: InvalidSignerError (); - InvalidSignerError (std::string reason); + explicit InvalidSignerError (std::string reason); }; class ProgrammingError : public std::runtime_error @@ -239,7 +239,7 @@ public: class TextEncodingError : public std::runtime_error { public: - TextEncodingError (std::string s) + explicit TextEncodingError (std::string s) : std::runtime_error (s) {} }; @@ -247,7 +247,7 @@ public: class OldFormatError : public std::runtime_error { public: - OldFormatError (std::string s) + explicit OldFormatError (std::string s) : std::runtime_error (s) {} }; diff --git a/src/lib/ffmpeg.h b/src/lib/ffmpeg.h index 95a8bf5d9..dab67ead9 100644 --- a/src/lib/ffmpeg.h +++ b/src/lib/ffmpeg.h @@ -40,7 +40,7 @@ class Log; class FFmpeg { public: - FFmpeg (boost::shared_ptr); + explicit FFmpeg (boost::shared_ptr); virtual ~FFmpeg (); boost::shared_ptr ffmpeg_content () const { diff --git a/src/lib/ffmpeg_stream.h b/src/lib/ffmpeg_stream.h index ec27a30f0..84b2a8853 100644 --- a/src/lib/ffmpeg_stream.h +++ b/src/lib/ffmpeg_stream.h @@ -35,7 +35,7 @@ public: , _id (i) {} - FFmpegStream (cxml::ConstNodePtr); + explicit FFmpegStream (cxml::ConstNodePtr); void as_xml (xmlpp::Node *) const; diff --git a/src/lib/ffmpeg_subtitle_period.h b/src/lib/ffmpeg_subtitle_period.h index 1c2c05975..42c7bf763 100644 --- a/src/lib/ffmpeg_subtitle_period.h +++ b/src/lib/ffmpeg_subtitle_period.h @@ -24,7 +24,7 @@ class FFmpegSubtitlePeriod { public: - FFmpegSubtitlePeriod (ContentTime f) + explicit FFmpegSubtitlePeriod (ContentTime f) : from (f) {} diff --git a/src/lib/file_group.h b/src/lib/file_group.h index 865e6bd22..800d9a059 100644 --- a/src/lib/file_group.h +++ b/src/lib/file_group.h @@ -35,8 +35,8 @@ class FileGroup { public: FileGroup (); - FileGroup (boost::filesystem::path); - FileGroup (std::vector const &); + explicit FileGroup (boost::filesystem::path); + explicit FileGroup (std::vector const &); ~FileGroup (); void set_paths (std::vector const &); diff --git a/src/lib/file_log.h b/src/lib/file_log.h index bd6a7bf6a..6904bfd77 100644 --- a/src/lib/file_log.h +++ b/src/lib/file_log.h @@ -23,7 +23,7 @@ class FileLog : public Log { public: - FileLog (boost::filesystem::path file); + explicit FileLog (boost::filesystem::path file); std::string head_and_tail (int amount = 1024) const; diff --git a/src/lib/film.h b/src/lib/film.h index 355a41da5..20a1e2ca6 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -67,7 +67,7 @@ struct isdcf_name_test; class Film : public boost::enable_shared_from_this, public Signaller, public boost::noncopyable { public: - Film (boost::optional dir); + explicit Film (boost::optional dir); ~Film (); boost::filesystem::path info_file (DCPTimePeriod p) const; diff --git a/src/lib/font.h b/src/lib/font.h index bbf88b34a..cb18e4798 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -31,10 +31,10 @@ class Font { public: - Font (std::string id) + explicit Font (std::string id) : _id (id) {} - Font (cxml::NodePtr node); + explicit Font (cxml::NodePtr node); void as_xml (xmlpp::Node* node); diff --git a/src/lib/image.h b/src/lib/image.h index 8de0a2c69..f71a47b0c 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -41,8 +41,8 @@ class Image { public: Image (AVPixelFormat p, dcp::Size s, bool aligned, int extra_pixels = 0); - Image (AVFrame *); - Image (Image const &); + explicit Image (AVFrame *); + explicit Image (Image const &); Image (boost::shared_ptr, bool); Image& operator= (Image const &); ~Image (); diff --git a/src/lib/isdcf_metadata.h b/src/lib/isdcf_metadata.h index 5d0e865fb..49d204cf4 100644 --- a/src/lib/isdcf_metadata.h +++ b/src/lib/isdcf_metadata.h @@ -39,7 +39,7 @@ public: , two_d_version_of_three_d (false) {} - ISDCFMetadata (cxml::ConstNodePtr); + explicit ISDCFMetadata (cxml::ConstNodePtr); void as_xml (xmlpp::Node *) const; void read_old_metadata (std::string, std::string); diff --git a/src/lib/job.h b/src/lib/job.h index 185273e2d..e5552e49e 100644 --- a/src/lib/job.h +++ b/src/lib/job.h @@ -40,7 +40,7 @@ class Film; class Job : public boost::enable_shared_from_this, public Signaller, public boost::noncopyable { public: - Job (boost::shared_ptr film); + explicit Job (boost::shared_ptr film); virtual ~Job (); /** @return user-readable name of this job */ diff --git a/src/lib/json_server.h b/src/lib/json_server.h index 996b9bf79..f36e621f3 100644 --- a/src/lib/json_server.h +++ b/src/lib/json_server.h @@ -23,7 +23,7 @@ class JSONServer { public: - JSONServer (int port); + explicit JSONServer (int port); private: void run (int port); diff --git a/src/lib/log_entry.h b/src/lib/log_entry.h index ba358f5a3..3d6a9f371 100644 --- a/src/lib/log_entry.h +++ b/src/lib/log_entry.h @@ -36,7 +36,7 @@ public: static const int TYPE_TIMING; static const int TYPE_DEBUG_EMAIL; - LogEntry (int type); + explicit LogEntry (int type); virtual ~LogEntry () {} virtual std::string message () const = 0; diff --git a/src/lib/magick_image_proxy.h b/src/lib/magick_image_proxy.h index 1db45d73b..32d2f7efb 100644 --- a/src/lib/magick_image_proxy.h +++ b/src/lib/magick_image_proxy.h @@ -26,7 +26,7 @@ class MagickImageProxy : public ImageProxy { public: - MagickImageProxy (boost::filesystem::path); + explicit MagickImageProxy (boost::filesystem::path); MagickImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); boost::shared_ptr image ( diff --git a/src/lib/raw_image_proxy.h b/src/lib/raw_image_proxy.h index 2b64cbd9b..9f8424eb3 100644 --- a/src/lib/raw_image_proxy.h +++ b/src/lib/raw_image_proxy.h @@ -26,7 +26,7 @@ class RawImageProxy : public ImageProxy { public: - RawImageProxy (boost::shared_ptr); + explicit RawImageProxy (boost::shared_ptr); RawImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); boost::shared_ptr image ( diff --git a/src/lib/rgba.h b/src/lib/rgba.h index b6f0cc1f1..c9521f311 100644 --- a/src/lib/rgba.h +++ b/src/lib/rgba.h @@ -45,7 +45,7 @@ public: , a (a_) {} - RGBA (cxml::ConstNodePtr node); + explicit RGBA (cxml::ConstNodePtr node); void as_xml (xmlpp::Node* parent) const; diff --git a/src/lib/screen.h b/src/lib/screen.h index cea5fe29c..5e8f1f975 100644 --- a/src/lib/screen.h +++ b/src/lib/screen.h @@ -40,7 +40,7 @@ public: , trusted_devices (td) {} - Screen (cxml::ConstNodePtr); + explicit Screen (cxml::ConstNodePtr); void as_xml (xmlpp::Element *) const; diff --git a/src/lib/signaller.h b/src/lib/signaller.h index a6c74c954..b67a63917 100644 --- a/src/lib/signaller.h +++ b/src/lib/signaller.h @@ -71,7 +71,7 @@ template class Wrapper : public WrapperBase { public: - Wrapper (T signal) + explicit Wrapper (T signal) : _signal (signal) { diff --git a/src/lib/subtitle_content.h b/src/lib/subtitle_content.h index 58dc51510..b64e4787b 100644 --- a/src/lib/subtitle_content.h +++ b/src/lib/subtitle_content.h @@ -57,7 +57,7 @@ public: class SubtitleContent : public ContentPart { public: - SubtitleContent (Content* parent); + explicit SubtitleContent (Content* parent); SubtitleContent (Content* parent, std::vector >); void as_xml (xmlpp::Node *) const; diff --git a/src/lib/subtitle_string.h b/src/lib/subtitle_string.h index c1b0b14a8..81ebc2744 100644 --- a/src/lib/subtitle_string.h +++ b/src/lib/subtitle_string.h @@ -30,7 +30,7 @@ class SubtitleString : public dcp::SubtitleString { public: - SubtitleString (dcp::SubtitleString dcp_) + explicit SubtitleString (dcp::SubtitleString dcp_) : dcp::SubtitleString (dcp_) , outline_width (2) {} diff --git a/src/lib/text_subtitle.h b/src/lib/text_subtitle.h index 94adb5cc5..c72486ca0 100644 --- a/src/lib/text_subtitle.h +++ b/src/lib/text_subtitle.h @@ -35,7 +35,7 @@ class text_subtitle_parse_test; class TextSubtitle { public: - TextSubtitle (boost::shared_ptr); + explicit TextSubtitle (boost::shared_ptr); boost::optional first () const; ContentTime length () const; diff --git a/src/lib/timer.h b/src/lib/timer.h index a7d4c8d01..9ea95c720 100644 --- a/src/lib/timer.h +++ b/src/lib/timer.h @@ -37,7 +37,7 @@ class PeriodTimer { public: - PeriodTimer (std::string n); + explicit PeriodTimer (std::string n); ~PeriodTimer (); private: diff --git a/src/lib/transcode_job.h b/src/lib/transcode_job.h index 47611525a..9dd9e3684 100644 --- a/src/lib/transcode_job.h +++ b/src/lib/transcode_job.h @@ -33,7 +33,7 @@ class Encoder; class TranscodeJob : public Job { public: - TranscodeJob (boost::shared_ptr film); + explicit TranscodeJob (boost::shared_ptr film); std::string name () const; std::string json_name () const; diff --git a/src/lib/types.h b/src/lib/types.h index 8f99b8881..ed3746f45 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -134,7 +134,7 @@ struct Crop { Crop () : left (0), right (0), top (0), bottom (0) {} Crop (int l, int r, int t, int b) : left (l), right (r), top (t), bottom (b) {} - Crop (boost::shared_ptr); + explicit Crop (boost::shared_ptr); /** Number of pixels to remove from the left-hand side */ int left; diff --git a/src/lib/upload_job.h b/src/lib/upload_job.h index 4d3768515..407094ab8 100644 --- a/src/lib/upload_job.h +++ b/src/lib/upload_job.h @@ -27,7 +27,7 @@ class UploadJob : public Job { public: - UploadJob (boost::shared_ptr); + explicit UploadJob (boost::shared_ptr); std::string name () const; std::string json_name () const; diff --git a/src/lib/upmixer_a.h b/src/lib/upmixer_a.h index de02a8d95..fe6a373ca 100644 --- a/src/lib/upmixer_a.h +++ b/src/lib/upmixer_a.h @@ -31,7 +31,7 @@ class UpmixerA : public AudioProcessor { public: - UpmixerA (int sampling_rate); + explicit UpmixerA (int sampling_rate); std::string name () const; std::string id () const; diff --git a/src/lib/upmixer_b.h b/src/lib/upmixer_b.h index 0c724b36c..47b4fadef 100644 --- a/src/lib/upmixer_b.h +++ b/src/lib/upmixer_b.h @@ -29,7 +29,7 @@ class UpmixerB : public AudioProcessor { public: - UpmixerB (int sampling_rate); + explicit UpmixerB (int sampling_rate); std::string name () const; std::string id () const; diff --git a/src/lib/video_content.h b/src/lib/video_content.h index 84b3d2268..774210c13 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -51,7 +51,7 @@ public: class VideoContent : public ContentPart, public boost::enable_shared_from_this { public: - VideoContent (Content* parent); + explicit VideoContent (Content* parent); VideoContent (Content* parent, std::vector >); void as_xml (xmlpp::Node *) const; diff --git a/src/lib/video_content_scale.h b/src/lib/video_content_scale.h index 1054234bc..2f161b1a7 100644 --- a/src/lib/video_content_scale.h +++ b/src/lib/video_content_scale.h @@ -40,9 +40,9 @@ class VideoContentScale { public: VideoContentScale (); - VideoContentScale (Ratio const *); - VideoContentScale (bool); - VideoContentScale (boost::shared_ptr); + explicit VideoContentScale (Ratio const *); + explicit VideoContentScale (bool); + explicit VideoContentScale (boost::shared_ptr); dcp::Size size (boost::shared_ptr, dcp::Size display_container, dcp::Size film_container) const; std::string id () const; diff --git a/src/lib/video_mxf_examiner.h b/src/lib/video_mxf_examiner.h index 43e82da4d..3a0189a2f 100644 --- a/src/lib/video_mxf_examiner.h +++ b/src/lib/video_mxf_examiner.h @@ -29,7 +29,7 @@ namespace dcp { class VideoMXFExaminer : public VideoExaminer { public: - VideoMXFExaminer (boost::shared_ptr); + explicit VideoMXFExaminer (boost::shared_ptr); boost::optional video_frame_rate () const; dcp::Size video_size () const; diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 05534cc60..b22120143 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -113,7 +113,7 @@ using dcp::raw_convert; class FilmChangedClosingDialog : public boost::noncopyable { public: - FilmChangedClosingDialog (string name) + explicit FilmChangedClosingDialog (string name) { _dialog = new wxMessageDialog ( 0, @@ -146,7 +146,7 @@ private: class FilmChangedDuplicatingDialog : public boost::noncopyable { public: - FilmChangedDuplicatingDialog (string name) + explicit FilmChangedDuplicatingDialog (string name) { _dialog = new wxMessageDialog ( 0, @@ -223,7 +223,7 @@ enum { class DOMFrame : public wxFrame { public: - DOMFrame (wxString const & title) + explicit DOMFrame (wxString const & title) : wxFrame (NULL, -1, title) , _video_waveform_dialog (0) , _hints_dialog (0) diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 3cfe6c0a0..f6197b1e2 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -91,7 +91,7 @@ setup_menu (wxMenuBar* m) class DOMFrame : public wxFrame { public: - DOMFrame (wxString const & title) + explicit DOMFrame (wxString const & title) : wxFrame (NULL, -1, title) , _sizer (new wxBoxSizer (wxVERTICAL)) , _config_dialog (0) @@ -252,7 +252,7 @@ static const wxCmdLineEntryDesc command_line_description[] = { class JobServer : public Server { public: - JobServer (DOMFrame* frame) + explicit JobServer (DOMFrame* frame) : Server (BATCH_JOB_PORT) , _frame (frame) {} diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 5b296b300..65326efb3 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -79,7 +79,7 @@ enum { class DOMFrame : public wxFrame { public: - DOMFrame (wxString const & title) + explicit DOMFrame (wxString const & title) : wxFrame (0, -1, title) , _config_dialog (0) , _job_view (0) diff --git a/src/wx/about_dialog.h b/src/wx/about_dialog.h index 5e8954908..c19654599 100644 --- a/src/wx/about_dialog.h +++ b/src/wx/about_dialog.h @@ -32,11 +32,10 @@ class wxNotebook; class AboutDialog : public wxDialog { public: - AboutDialog (wxWindow *); + explicit AboutDialog (wxWindow *); private: void add_section (wxString, wxArrayString); wxNotebook* _notebook; ///< notebook used to keep each list of names for the credits }; - diff --git a/src/wx/audio_mapping_view.h b/src/wx/audio_mapping_view.h index 6d2265784..18ab25407 100644 --- a/src/wx/audio_mapping_view.h +++ b/src/wx/audio_mapping_view.h @@ -46,7 +46,7 @@ class AudioMappingView : public wxPanel { public: - AudioMappingView (wxWindow *); + explicit AudioMappingView (wxWindow *); void set (AudioMapping); void set_input_channels (std::vector const & names); diff --git a/src/wx/audio_panel.h b/src/wx/audio_panel.h index fe9f1cdec..ede0ddb26 100644 --- a/src/wx/audio_panel.h +++ b/src/wx/audio_panel.h @@ -32,7 +32,7 @@ class AudioDialog; class AudioPanel : public ContentSubPanel { public: - AudioPanel (ContentPanel *); + explicit AudioPanel (ContentPanel *); ~AudioPanel (); void film_changed (Film::Property); diff --git a/src/wx/audio_plot.h b/src/wx/audio_plot.h index 2f4b224e8..49f7e4ab3 100644 --- a/src/wx/audio_plot.h +++ b/src/wx/audio_plot.h @@ -29,7 +29,7 @@ struct Metrics; class AudioPlot : public wxPanel { public: - AudioPlot (wxWindow *); + explicit AudioPlot (wxWindow *); void set_analysis (boost::shared_ptr); void set_channel_visible (int c, bool v); diff --git a/src/wx/content_menu.h b/src/wx/content_menu.h index 064733103..a38109b07 100644 --- a/src/wx/content_menu.h +++ b/src/wx/content_menu.h @@ -34,7 +34,7 @@ class DCPContent; class ContentMenu : public boost::noncopyable { public: - ContentMenu (wxWindow* p); + explicit ContentMenu (wxWindow* p); void popup (boost::weak_ptr, ContentList, TimelineContentViewList, wxPoint); diff --git a/src/wx/dir_picker_ctrl.h b/src/wx/dir_picker_ctrl.h index 2a486d891..659fe07ea 100644 --- a/src/wx/dir_picker_ctrl.h +++ b/src/wx/dir_picker_ctrl.h @@ -23,7 +23,7 @@ class DirPickerCtrl : public wxPanel { public: - DirPickerCtrl (wxWindow *); + explicit DirPickerCtrl (wxWindow *); wxString GetPath () const; void SetPath (wxString); diff --git a/src/wx/download_certificate_dialog.h b/src/wx/download_certificate_dialog.h index cae5f59d8..dcb0a952a 100644 --- a/src/wx/download_certificate_dialog.h +++ b/src/wx/download_certificate_dialog.h @@ -26,7 +26,7 @@ class DownloadCertificatePanel; class DownloadCertificateDialog : public wxDialog { public: - DownloadCertificateDialog (wxWindow* parent); + explicit DownloadCertificateDialog (wxWindow* parent); ~DownloadCertificateDialog (); dcp::Certificate certificate () const; diff --git a/src/wx/email_dialog.h b/src/wx/email_dialog.h index 40a6fdb74..932dd8714 100644 --- a/src/wx/email_dialog.h +++ b/src/wx/email_dialog.h @@ -24,7 +24,7 @@ class EmailDialog : public TableDialog { public: - EmailDialog (wxWindow *); + explicit EmailDialog (wxWindow *); void set (std::string); boost::optional get () const; diff --git a/src/wx/export_dialog.h b/src/wx/export_dialog.h index 0406c562f..d785d910d 100644 --- a/src/wx/export_dialog.h +++ b/src/wx/export_dialog.h @@ -28,7 +28,7 @@ class FilePickerCtrl; class ExportDialog : public TableDialog { public: - ExportDialog (wxWindow* parent); + explicit ExportDialog (wxWindow* parent); boost::filesystem::path path () const; FFmpegEncoder::Format format () const; diff --git a/src/wx/gain_calculator_dialog.h b/src/wx/gain_calculator_dialog.h index c68e9426f..e1ed026b8 100644 --- a/src/wx/gain_calculator_dialog.h +++ b/src/wx/gain_calculator_dialog.h @@ -24,7 +24,7 @@ class GainCalculatorDialog : public TableDialog { public: - GainCalculatorDialog (wxWindow* parent); + explicit GainCalculatorDialog (wxWindow* parent); float actual_fader () const; float wanted_fader () const; diff --git a/src/wx/image_sequence_dialog.h b/src/wx/image_sequence_dialog.h index 3104cef48..65d1cb922 100644 --- a/src/wx/image_sequence_dialog.h +++ b/src/wx/image_sequence_dialog.h @@ -24,7 +24,7 @@ class ImageSequenceDialog : public TableDialog { public: - ImageSequenceDialog (wxWindow* parent); + explicit ImageSequenceDialog (wxWindow* parent); double frame_rate () const; diff --git a/src/wx/kdm_timing_panel.h b/src/wx/kdm_timing_panel.h index 368b45146..a926864db 100644 --- a/src/wx/kdm_timing_panel.h +++ b/src/wx/kdm_timing_panel.h @@ -28,7 +28,7 @@ class TimePicker; class KDMTimingPanel : public wxPanel { public: - KDMTimingPanel (wxWindow* parent); + explicit KDMTimingPanel (wxWindow* parent); /** @return KDM from time in local time */ boost::posix_time::ptime from () const; diff --git a/src/wx/new_dkdm_folder_dialog.h b/src/wx/new_dkdm_folder_dialog.h index 3f4a1503e..ff99aad61 100644 --- a/src/wx/new_dkdm_folder_dialog.h +++ b/src/wx/new_dkdm_folder_dialog.h @@ -23,7 +23,7 @@ class NewDKDMFolderDialog : public TableDialog { public: - NewDKDMFolderDialog (wxWindow* parent); + explicit NewDKDMFolderDialog (wxWindow* parent); void set (wxString n); wxString get () const; diff --git a/src/wx/rename_template_dialog.h b/src/wx/rename_template_dialog.h index bef9f542b..4ad4ee4c4 100644 --- a/src/wx/rename_template_dialog.h +++ b/src/wx/rename_template_dialog.h @@ -23,7 +23,7 @@ class RenameTemplateDialog : public TableDialog { public: - RenameTemplateDialog (wxWindow* parent); + explicit RenameTemplateDialog (wxWindow* parent); void set (wxString n); wxString get () const; diff --git a/src/wx/repeat_dialog.h b/src/wx/repeat_dialog.h index a3ae7f8da..0c4fb6a86 100644 --- a/src/wx/repeat_dialog.h +++ b/src/wx/repeat_dialog.h @@ -25,7 +25,7 @@ class RepeatDialog : public TableDialog { public: - RepeatDialog (wxWindow *); + explicit RepeatDialog (wxWindow *); int number () const; diff --git a/src/wx/save_template_dialog.h b/src/wx/save_template_dialog.h index 5fc4300f8..3ccf17ed0 100644 --- a/src/wx/save_template_dialog.h +++ b/src/wx/save_template_dialog.h @@ -23,7 +23,7 @@ class SaveTemplateDialog : public TableDialog { public: - SaveTemplateDialog (wxWindow* parent); + explicit SaveTemplateDialog (wxWindow* parent); std::string name () const; diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index e6c2b6dd8..c7684d77f 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -45,7 +45,7 @@ column (dcp::Certificate c) class CertificateFileDialogWrapper : public FileDialogWrapper { public: - CertificateFileDialogWrapper (wxWindow* parent) + explicit CertificateFileDialogWrapper (wxWindow* parent) : FileDialogWrapper (parent, _("Select certificate file")) { diff --git a/src/wx/screens_panel.h b/src/wx/screens_panel.h index 87f12c701..718179052 100644 --- a/src/wx/screens_panel.h +++ b/src/wx/screens_panel.h @@ -31,7 +31,7 @@ class Screen; class ScreensPanel : public wxPanel { public: - ScreensPanel (wxWindow* parent); + explicit ScreensPanel (wxWindow* parent); ~ScreensPanel (); std::list > screens () const; diff --git a/src/wx/server_dialog.h b/src/wx/server_dialog.h index 8c0249017..92b417a4c 100644 --- a/src/wx/server_dialog.h +++ b/src/wx/server_dialog.h @@ -24,7 +24,7 @@ class ServerDialog : public TableDialog { public: - ServerDialog (wxWindow *); + explicit ServerDialog (wxWindow *); void set (std::string); boost::optional get () const; diff --git a/src/wx/servers_list_dialog.h b/src/wx/servers_list_dialog.h index 114e6b851..309cde77e 100644 --- a/src/wx/servers_list_dialog.h +++ b/src/wx/servers_list_dialog.h @@ -26,7 +26,7 @@ class ServersListDialog : public wxDialog { public: - ServersListDialog (wxWindow *); + explicit ServersListDialog (wxWindow *); private: void servers_list_changed (); diff --git a/src/wx/subtitle_panel.h b/src/wx/subtitle_panel.h index 16836eb36..5e619a995 100644 --- a/src/wx/subtitle_panel.h +++ b/src/wx/subtitle_panel.h @@ -28,7 +28,7 @@ class FontsDialog; class SubtitlePanel : public ContentSubPanel { public: - SubtitlePanel (ContentPanel *); + explicit SubtitlePanel (ContentPanel *); void film_changed (Film::Property); void film_content_changed (int); diff --git a/src/wx/system_font_dialog.h b/src/wx/system_font_dialog.h index 9cced4956..48a31a839 100644 --- a/src/wx/system_font_dialog.h +++ b/src/wx/system_font_dialog.h @@ -36,7 +36,7 @@ class wxListCtrl; class SystemFontDialog : public wxDialog { public: - SystemFontDialog (wxWindow* parent); + explicit SystemFontDialog (wxWindow* parent); boost::optional get_font () const; diff --git a/src/wx/templates_dialog.h b/src/wx/templates_dialog.h index 039573932..8ef0d956c 100644 --- a/src/wx/templates_dialog.h +++ b/src/wx/templates_dialog.h @@ -25,7 +25,7 @@ class TemplatesDialog : public wxDialog { public: - TemplatesDialog (wxWindow* parent); + explicit TemplatesDialog (wxWindow* parent); void refresh (); void layout (); diff --git a/src/wx/timeline_labels_view.h b/src/wx/timeline_labels_view.h index 87b3cc902..90293768c 100644 --- a/src/wx/timeline_labels_view.h +++ b/src/wx/timeline_labels_view.h @@ -25,7 +25,7 @@ class wxWindow; class TimelineLabelsView : public TimelineView { public: - TimelineLabelsView (Timeline& tl); + explicit TimelineLabelsView (Timeline& tl); dcpomatic::Rect bbox () const; diff --git a/src/wx/timeline_view.h b/src/wx/timeline_view.h index c99faad06..f0ded7bce 100644 --- a/src/wx/timeline_view.h +++ b/src/wx/timeline_view.h @@ -34,7 +34,7 @@ class Timeline; class TimelineView : public boost::noncopyable { public: - TimelineView (Timeline& t); + explicit TimelineView (Timeline& t); virtual ~TimelineView () {} void paint (wxGraphicsContext* g, std::list > overlaps); diff --git a/src/wx/video_panel.h b/src/wx/video_panel.h index c405822be..2be7eb049 100644 --- a/src/wx/video_panel.h +++ b/src/wx/video_panel.h @@ -39,7 +39,7 @@ class wxButton; class VideoPanel : public ContentSubPanel { public: - VideoPanel (ContentPanel *); + explicit VideoPanel (ContentPanel *); void film_changed (Film::Property); void film_content_changed (int); diff --git a/src/wx/wx_signal_manager.h b/src/wx/wx_signal_manager.h index 6671b8318..2e6ddc300 100644 --- a/src/wx/wx_signal_manager.h +++ b/src/wx/wx_signal_manager.h @@ -29,7 +29,7 @@ class wxEvtHandler; class wxSignalManager : public SignalManager { public: - wxSignalManager (wxEvtHandler *); + explicit wxSignalManager (wxEvtHandler *); void wake_ui (); private: diff --git a/test/job_test.cc b/test/job_test.cc index f4c9658bf..fa4890470 100644 --- a/test/job_test.cc +++ b/test/job_test.cc @@ -34,7 +34,7 @@ using boost::shared_ptr; class TestJob : public Job { public: - TestJob (shared_ptr film) + explicit TestJob (shared_ptr film) : Job (film) { -- 2.30.2