From: Carl Hetherington Date: Thu, 2 Dec 2021 22:05:16 +0000 (+0100) Subject: Missing explicit. X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=c85f253637e6aecfd7ce7bd53c68a2a73ca49d7b;p=dcpomatic.git Missing explicit. --- diff --git a/src/lib/atmos_metadata.h b/src/lib/atmos_metadata.h index 65f2cc6c2..15d6e3295 100644 --- a/src/lib/atmos_metadata.h +++ b/src/lib/atmos_metadata.h @@ -26,7 +26,7 @@ class AtmosMetadata { public: - AtmosMetadata (std::shared_ptr asset); + explicit AtmosMetadata (std::shared_ptr asset); std::shared_ptr create (dcp::Fraction edit_rate) const; private: diff --git a/src/lib/atmos_mxf_content.h b/src/lib/atmos_mxf_content.h index 57f041774..42635ab89 100644 --- a/src/lib/atmos_mxf_content.h +++ b/src/lib/atmos_mxf_content.h @@ -26,7 +26,7 @@ class AtmosMXFContent : public Content { public: - AtmosMXFContent (boost::filesystem::path path); + explicit AtmosMXFContent (boost::filesystem::path path); AtmosMXFContent (cxml::ConstNodePtr node, int version); std::shared_ptr shared_from_this () { diff --git a/src/lib/check_content_change_job.h b/src/lib/check_content_change_job.h index a374e2a6f..212a49139 100644 --- a/src/lib/check_content_change_job.h +++ b/src/lib/check_content_change_job.h @@ -27,7 +27,7 @@ class CheckContentChangeJob : public Job { public: - CheckContentChangeJob (std::shared_ptr); + explicit CheckContentChangeJob (std::shared_ptr); ~CheckContentChangeJob (); std::string name () const override; diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 7fc800b52..9f5d5c775 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -50,7 +50,7 @@ class ContentPart; class DCPContent : public Content { public: - DCPContent (boost::filesystem::path p); + explicit DCPContent (boost::filesystem::path p); DCPContent (cxml::ConstNodePtr, int version); std::shared_ptr shared_from_this () { diff --git a/src/lib/dcp_subtitle_content.h b/src/lib/dcp_subtitle_content.h index 5949f8b0b..f346dd661 100644 --- a/src/lib/dcp_subtitle_content.h +++ b/src/lib/dcp_subtitle_content.h @@ -24,7 +24,7 @@ class DCPSubtitleContent : public DCPSubtitle, public Content { public: - DCPSubtitleContent (boost::filesystem::path); + explicit DCPSubtitleContent (boost::filesystem::path); DCPSubtitleContent (cxml::ConstNodePtr, int); void examine (std::shared_ptr film, std::shared_ptr) override; diff --git a/src/lib/dcp_text_track.h b/src/lib/dcp_text_track.h index b29d8c489..7180e61b5 100644 --- a/src/lib/dcp_text_track.h +++ b/src/lib/dcp_text_track.h @@ -35,7 +35,7 @@ class DCPTextTrack { public: DCPTextTrack () {} - DCPTextTrack (cxml::ConstNodePtr node); + explicit DCPTextTrack (cxml::ConstNodePtr node); DCPTextTrack (std::string name_, boost::optional language_); std::string name; diff --git a/src/lib/dcpomatic_socket.h b/src/lib/dcpomatic_socket.h index f4520e5cf..35c94660b 100644 --- a/src/lib/dcpomatic_socket.h +++ b/src/lib/dcpomatic_socket.h @@ -53,7 +53,7 @@ public: class ReadDigestScope { public: - ReadDigestScope (std::shared_ptr socket); + explicit ReadDigestScope (std::shared_ptr socket); bool check (); private: std::weak_ptr _socket; @@ -66,7 +66,7 @@ public: class WriteDigestScope { public: - WriteDigestScope (std::shared_ptr socket); + explicit WriteDigestScope (std::shared_ptr socket); ~WriteDigestScope (); private: std::weak_ptr _socket; diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 9b7837a46..28dd46814 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -155,7 +155,7 @@ public: class FileNotFoundError : public std::runtime_error { public: - FileNotFoundError (boost::filesystem::path f); + explicit FileNotFoundError (boost::filesystem::path f); virtual ~FileNotFoundError () throw () {} /** @return name of the file that this exception concerns */ @@ -178,7 +178,7 @@ public: /** @param f File that we were trying to read from. * @param e errno value, or 0. */ - ReadFileError (boost::filesystem::path f, int e = 0); + explicit ReadFileError (boost::filesystem::path f, int e = 0); }; @@ -378,7 +378,7 @@ class GLError : public std::runtime_error { public: GLError (char const* last, int e); - GLError (char const* message); + explicit GLError (char const* message); }; @@ -388,7 +388,7 @@ public: class CopyError : public std::runtime_error { public: - CopyError (std::string s, boost::optional n = boost::optional()); + explicit CopyError (std::string s, boost::optional n = boost::optional()); virtual ~CopyError () throw () {} std::string message () const { diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h index ce4a8aa69..d370335b2 100644 --- a/src/lib/ffmpeg_content.h +++ b/src/lib/ffmpeg_content.h @@ -47,9 +47,9 @@ public: class FFmpegContent : public Content { public: - FFmpegContent (boost::filesystem::path); + explicit FFmpegContent (boost::filesystem::path); FFmpegContent (cxml::ConstNodePtr, int version, std::list &); - FFmpegContent (std::vector>); + explicit FFmpegContent (std::vector>); std::shared_ptr shared_from_this () { return std::dynamic_pointer_cast (Content::shared_from_this ()); diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h index 69347bfd4..5e7399bce 100644 --- a/src/lib/ffmpeg_examiner.h +++ b/src/lib/ffmpeg_examiner.h @@ -33,7 +33,7 @@ class Job; class FFmpegExaminer : public FFmpeg, public VideoExaminer { public: - FFmpegExaminer (std::shared_ptr, std::shared_ptr job = std::shared_ptr()); + explicit FFmpegExaminer (std::shared_ptr, std::shared_ptr job = std::shared_ptr()); bool has_video () const override; diff --git a/src/lib/ffmpeg_image_proxy.h b/src/lib/ffmpeg_image_proxy.h index b2b0260b5..bc970b13a 100644 --- a/src/lib/ffmpeg_image_proxy.h +++ b/src/lib/ffmpeg_image_proxy.h @@ -29,7 +29,7 @@ class FFmpegImageProxy : public ImageProxy public: explicit FFmpegImageProxy (boost::filesystem::path); explicit FFmpegImageProxy (dcp::ArrayData); - FFmpegImageProxy (std::shared_ptr socket); + explicit FFmpegImageProxy (std::shared_ptr socket); Result image ( Image::Alignment alignment, diff --git a/src/lib/font_data.h b/src/lib/font_data.h index 7bd6d4648..fff2928fd 100644 --- a/src/lib/font_data.h +++ b/src/lib/font_data.h @@ -38,7 +38,7 @@ class Font; class FontData { public: - FontData (std::shared_ptr font); + explicit FontData (std::shared_ptr font); FontData (std::string id_, dcp::ArrayData data_) : id(id_) diff --git a/src/lib/image_content.h b/src/lib/image_content.h index d817eeee8..23b50233c 100644 --- a/src/lib/image_content.h +++ b/src/lib/image_content.h @@ -26,7 +26,7 @@ class ImageContent : public Content { public: - ImageContent (boost::filesystem::path); + explicit ImageContent (boost::filesystem::path); ImageContent (cxml::ConstNodePtr, int); std::shared_ptr shared_from_this () { diff --git a/src/lib/pixel_quanta.h b/src/lib/pixel_quanta.h index 018ce3346..d91d32843 100644 --- a/src/lib/pixel_quanta.h +++ b/src/lib/pixel_quanta.h @@ -49,7 +49,7 @@ public: , y(y_) {} - PixelQuanta (cxml::ConstNodePtr node); + explicit PixelQuanta (cxml::ConstNodePtr node); void as_xml (xmlpp::Element* node) const; diff --git a/src/lib/rng.h b/src/lib/rng.h index e3dc0c50d..1e47fcd02 100644 --- a/src/lib/rng.h +++ b/src/lib/rng.h @@ -31,7 +31,7 @@ namespace dcpomatic { class RNG { public: - RNG (int32_t seed); + explicit RNG (int32_t seed); int32_t get (); diff --git a/src/lib/string_text_file_content.h b/src/lib/string_text_file_content.h index 9c7d4cea0..0f9408d4d 100644 --- a/src/lib/string_text_file_content.h +++ b/src/lib/string_text_file_content.h @@ -31,7 +31,7 @@ class Job; class StringTextFileContent : public Content { public: - StringTextFileContent (boost::filesystem::path); + explicit StringTextFileContent (boost::filesystem::path); StringTextFileContent (cxml::ConstNodePtr, int, std::list&); std::shared_ptr shared_from_this () { diff --git a/src/lib/types.h b/src/lib/types.h index 6fbad2188..624076a8c 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -216,7 +216,7 @@ extern bool operator!= (Crop const & a, Crop const & b); struct CPLSummary { - CPLSummary (boost::filesystem::path p); + explicit CPLSummary (boost::filesystem::path p); CPLSummary (std::string d, std::string i, std::string a, boost::filesystem::path f, bool e, time_t t) : dcp_directory (d) diff --git a/src/lib/video_mxf_content.h b/src/lib/video_mxf_content.h index 5a04c3da9..d360ecc49 100644 --- a/src/lib/video_mxf_content.h +++ b/src/lib/video_mxf_content.h @@ -25,7 +25,7 @@ class VideoMXFContent : public Content { public: - VideoMXFContent (boost::filesystem::path path); + explicit VideoMXFContent (boost::filesystem::path path); VideoMXFContent (cxml::ConstNodePtr node, int version); std::shared_ptr shared_from_this () { diff --git a/src/lib/zipper.h b/src/lib/zipper.h index 9f3e867c7..3a1e958c3 100644 --- a/src/lib/zipper.h +++ b/src/lib/zipper.h @@ -26,7 +26,7 @@ class Zipper { public: - Zipper (boost::filesystem::path file); + explicit Zipper (boost::filesystem::path file); ~Zipper (); Zipper (Zipper const&) = delete; diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc index 6f06c0624..39ac988b3 100644 --- a/src/tools/dcpomatic_playlist.cc +++ b/src/tools/dcpomatic_playlist.cc @@ -59,7 +59,7 @@ using namespace boost::placeholders; class ContentDialog : public wxDialog, public ContentStore { public: - ContentDialog (wxWindow* parent) + explicit ContentDialog (wxWindow* parent) : wxDialog (parent, wxID_ANY, _("Add content"), wxDefaultPosition, wxSize(800, 640)) , _content_view (new ContentView(this)) {