diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-02 10:28:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-02 10:28:16 +0100 |
| commit | 5591a50b918d2dc784a9e15688dfe24eb2b6dfcc (patch) | |
| tree | 0cc8e92c88326bd023440956a839f72979322071 /src | |
| parent | 68fa6e44a938d963129db758c25af8e843771a85 (diff) | |
Add some explicit declarations to constructors.
Diffstat (limited to 'src')
42 files changed, 73 insertions, 73 deletions
diff --git a/src/asset.h b/src/asset.h index a67af741..c0f4700f 100644 --- a/src/asset.h +++ b/src/asset.h @@ -49,7 +49,7 @@ class Asset : public Object { public: Asset (); - Asset (boost::filesystem::path file); + explicit Asset (boost::filesystem::path file); Asset (std::string id, boost::filesystem::path file); virtual bool equals ( diff --git a/src/asset_reader.h b/src/asset_reader.h index e02ab39c..cfdb468c 100644 --- a/src/asset_reader.h +++ b/src/asset_reader.h @@ -33,7 +33,7 @@ class MXF; class AssetReader : public boost::noncopyable { public: - AssetReader (MXF const * mxf); + explicit AssetReader (MXF const * mxf); virtual ~AssetReader (); protected: diff --git a/src/atmos_asset.h b/src/atmos_asset.h index 0be12025..2a5d0907 100644 --- a/src/atmos_asset.h +++ b/src/atmos_asset.h @@ -28,7 +28,7 @@ namespace dcp { class AtmosAsset : public Asset, public MXF { public: - AtmosAsset (boost::filesystem::path file); + explicit AtmosAsset (boost::filesystem::path file); std::string pkl_type (Standard) const; diff --git a/src/certificate.h b/src/certificate.h index be6a554c..373d9102 100644 --- a/src/certificate.h +++ b/src/certificate.h @@ -52,8 +52,8 @@ public: , _extra_data (false) {} - Certificate (std::string); - Certificate (X509 *); + explicit Certificate (std::string); + explicit Certificate (X509 *); Certificate (Certificate const &); ~Certificate (); @@ -51,7 +51,7 @@ class CPL : public Asset { public: CPL (std::string annotation_text, ContentKind content_kind); - CPL (boost::filesystem::path file); + explicit CPL (boost::filesystem::path file); bool equals ( boost::shared_ptr<const Asset> other, @@ -30,10 +30,10 @@ class Data { public: Data (); - Data (int size); + explicit Data (int size); Data (uint8_t const * data, int size); Data (boost::shared_array<uint8_t> data, int size); - Data (boost::filesystem::path file); + explicit Data (boost::filesystem::path file); virtual ~Data () {} @@ -64,7 +64,7 @@ public: * * @param directory Directory containing the DCP's files. */ - DCP (boost::filesystem::path directory); + explicit DCP (boost::filesystem::path directory); typedef std::list<boost::shared_ptr<DCPReadError> > ReadErrors; diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc index 61460b12..c6ba444f 100644 --- a/src/encrypted_kdm.cc +++ b/src/encrypted_kdm.cc @@ -46,7 +46,7 @@ class Signer public: Signer () {} - Signer (shared_ptr<const cxml::Node> node) + explicit Signer (shared_ptr<const cxml::Node> node) : x509_issuer_name (node->string_child ("X509IssuerName")) , x509_serial_number (node->string_child ("X509SerialNumber")) { @@ -68,7 +68,7 @@ class X509Data public: X509Data () {} - X509Data (boost::shared_ptr<const cxml::Node> node) + explicit X509Data (boost::shared_ptr<const cxml::Node> node) : x509_issuer_serial (Signer (node->node_child ("X509IssuerSerial"))) , x509_certificate (node->string_child ("X509Certificate")) { @@ -90,11 +90,11 @@ class Reference public: Reference () {} - Reference (string u) + explicit Reference (string u) : uri (u) {} - Reference (shared_ptr<const cxml::Node> node) + explicit Reference (shared_ptr<const cxml::Node> node) : uri (node->string_attribute ("URI")) , digest_value (node->string_child ("DigestValue")) { @@ -120,7 +120,7 @@ public: , authenticated_private ("#ID_AuthenticatedPrivate") {} - SignedInfo (shared_ptr<const cxml::Node> node) + explicit SignedInfo (shared_ptr<const cxml::Node> node) { list<shared_ptr<cxml::Node> > references = node->node_children ("Reference"); for (list<shared_ptr<cxml::Node> >::const_iterator i = references.begin(); i != references.end(); ++i) { @@ -158,7 +158,7 @@ class Signature public: Signature () {} - Signature (shared_ptr<const cxml::Node> node) + explicit Signature (shared_ptr<const cxml::Node> node) : signed_info (node->node_child ("SignedInfo")) , signature_value (node->string_child ("SignatureValue")) { @@ -189,7 +189,7 @@ class AuthenticatedPrivate public: AuthenticatedPrivate () {} - AuthenticatedPrivate (shared_ptr<const cxml::Node> node) + explicit AuthenticatedPrivate (shared_ptr<const cxml::Node> node) { list<shared_ptr<cxml::Node> > encrypted_key_nodes = node->node_children ("EncryptedKey"); for (list<shared_ptr<cxml::Node> >::const_iterator i = encrypted_key_nodes.begin(); i != encrypted_key_nodes.end(); ++i) { @@ -224,7 +224,7 @@ class TypedKeyId public: TypedKeyId () {} - TypedKeyId (shared_ptr<const cxml::Node> node) + explicit TypedKeyId (shared_ptr<const cxml::Node> node) : key_type (node->string_child ("KeyType")) , key_id (remove_urn_uuid (node->string_child ("KeyId"))) { @@ -256,7 +256,7 @@ class KeyIdList public: KeyIdList () {} - KeyIdList (shared_ptr<const cxml::Node> node) + explicit KeyIdList (shared_ptr<const cxml::Node> node) { list<shared_ptr<cxml::Node> > typed_key_id_nodes = node->node_children ("TypedKeyId"); for (list<shared_ptr<cxml::Node> >::const_iterator i = typed_key_id_nodes.begin(); i != typed_key_id_nodes.end(); ++i) { @@ -279,7 +279,7 @@ class AuthorizedDeviceInfo public: AuthorizedDeviceInfo () {} - AuthorizedDeviceInfo (shared_ptr<const cxml::Node> node) + explicit AuthorizedDeviceInfo (shared_ptr<const cxml::Node> node) : device_list_identifier (remove_urn_uuid (node->string_child ("DeviceListIdentifier"))) , device_list_description (node->optional_string_child ("DeviceListDescription")) { @@ -311,7 +311,7 @@ class X509IssuerSerial public: X509IssuerSerial () {} - X509IssuerSerial (shared_ptr<const cxml::Node> node) + explicit X509IssuerSerial (shared_ptr<const cxml::Node> node) : x509_issuer_name (node->string_child ("X509IssuerName")) , x509_serial_number (node->string_child ("X509SerialNumber")) { @@ -333,7 +333,7 @@ class Recipient public: Recipient () {} - Recipient (shared_ptr<const cxml::Node> node) + explicit Recipient (shared_ptr<const cxml::Node> node) : x509_issuer_serial (node->node_child ("X509IssuerSerial")) , x509_subject_name (node->string_child ("X509SubjectName")) { @@ -355,7 +355,7 @@ class KDMRequiredExtensions public: KDMRequiredExtensions () {} - KDMRequiredExtensions (shared_ptr<const cxml::Node> node) + explicit KDMRequiredExtensions (shared_ptr<const cxml::Node> node) : recipient (node->node_child ("Recipient")) , composition_playlist_id (remove_urn_uuid (node->string_child ("CompositionPlaylistId"))) , content_title_text (node->string_child ("ContentTitleText")) @@ -402,7 +402,7 @@ class RequiredExtensions public: RequiredExtensions () {} - RequiredExtensions (shared_ptr<const cxml::Node> node) + explicit RequiredExtensions (shared_ptr<const cxml::Node> node) : kdm_required_extensions (node->node_child ("KDMRequiredExtensions")) { @@ -426,7 +426,7 @@ public: , issue_date (LocalTime().as_string ()) {} - AuthenticatedPublic (shared_ptr<const cxml::Node> node) + explicit AuthenticatedPublic (shared_ptr<const cxml::Node> node) : message_id (remove_urn_uuid (node->string_child ("MessageId"))) , annotation_text (node->optional_string_child ("AnnotationText")) , issue_date (node->string_child ("IssueDate")) @@ -471,7 +471,7 @@ public: } - EncryptedKDMData (shared_ptr<const cxml::Node> node) + explicit EncryptedKDMData (shared_ptr<const cxml::Node> node) : authenticated_public (node->node_child ("AuthenticatedPublic")) , authenticated_private (node->node_child ("AuthenticatedPrivate")) , signature (node->node_child ("Signature")) diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h index 85cd348c..d1139d3a 100644 --- a/src/encrypted_kdm.h +++ b/src/encrypted_kdm.h @@ -53,7 +53,7 @@ class Certificate; class EncryptedKDM { public: - EncryptedKDM (std::string); + explicit EncryptedKDM (std::string); EncryptedKDM (EncryptedKDM const & kdm); EncryptedKDM & operator= (EncryptedKDM const &); ~EncryptedKDM (); diff --git a/src/exceptions.h b/src/exceptions.h index 2f7bc6a9..da75e0b6 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -71,7 +71,7 @@ public: class MiscError : public std::runtime_error { public: - MiscError (std::string message) + explicit MiscError (std::string message) : std::runtime_error (message) {} }; @@ -82,7 +82,7 @@ public: class DCPReadError : public std::runtime_error { public: - DCPReadError (std::string message) + explicit DCPReadError (std::string message) : std::runtime_error (message) {} }; @@ -110,7 +110,7 @@ public: class XMLError : public std::runtime_error { public: - XMLError (std::string message) + explicit XMLError (std::string message) : std::runtime_error (message) {} }; @@ -121,7 +121,7 @@ public: class UnresolvedRefError : public std::runtime_error { public: - UnresolvedRefError (std::string id); + explicit UnresolvedRefError (std::string id); }; /** @class TimeFormatError @@ -130,7 +130,7 @@ public: class TimeFormatError : public std::runtime_error { public: - TimeFormatError (std::string bad_time); + explicit TimeFormatError (std::string bad_time); }; /** @class NotEncryptedError @@ -140,7 +140,7 @@ public: class NotEncryptedError : public std::runtime_error { public: - NotEncryptedError (std::string const & what); + explicit NotEncryptedError (std::string const & what); ~NotEncryptedError () throw () {} }; @@ -35,7 +35,7 @@ namespace dcp { class File : public boost::noncopyable { public: - File (boost::filesystem::path file); + explicit File (boost::filesystem::path file); ~File (); uint8_t* data () const { diff --git a/src/font_node.h b/src/font_node.h index de8ca6bc..a1e9ab4f 100644 --- a/src/font_node.h +++ b/src/font_node.h @@ -41,7 +41,7 @@ public: {} FontNode (cxml::ConstNodePtr node, int tcr, std::string font_id_attribute); - FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes); + explicit FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes); std::string text; boost::optional<std::string> id; diff --git a/src/gamma_transfer_function.h b/src/gamma_transfer_function.h index 01f2831a..1d17a7c5 100644 --- a/src/gamma_transfer_function.h +++ b/src/gamma_transfer_function.h @@ -31,7 +31,7 @@ namespace dcp { class GammaTransferFunction : public TransferFunction { public: - GammaTransferFunction (double gamma); + explicit GammaTransferFunction (double gamma); double gamma () const { return _gamma; diff --git a/src/interop_load_font_node.h b/src/interop_load_font_node.h index ea0b4497..86777c6a 100644 --- a/src/interop_load_font_node.h +++ b/src/interop_load_font_node.h @@ -29,7 +29,7 @@ class InteropLoadFontNode : public LoadFontNode public: InteropLoadFontNode () {} InteropLoadFontNode (std::string id, std::string uri); - InteropLoadFontNode (cxml::ConstNodePtr node); + explicit InteropLoadFontNode (cxml::ConstNodePtr node); std::string uri; }; diff --git a/src/interop_subtitle_asset.h b/src/interop_subtitle_asset.h index 23ab7630..422108fd 100644 --- a/src/interop_subtitle_asset.h +++ b/src/interop_subtitle_asset.h @@ -37,7 +37,7 @@ class InteropSubtitleAsset : public SubtitleAsset { public: InteropSubtitleAsset (); - InteropSubtitleAsset (boost::filesystem::path file); + explicit InteropSubtitleAsset (boost::filesystem::path file); bool equals ( boost::shared_ptr<const Asset>, @@ -39,10 +39,10 @@ public: Key (); /** Create a Key from a raw key value */ - Key (uint8_t const *); + explicit Key (uint8_t const *); /** Create a Key from a hex key value */ - Key (std::string); + explicit Key (std::string); Key (Key const &); ~Key (); diff --git a/src/load_font_node.h b/src/load_font_node.h index 54bdb2f3..1a5c8692 100644 --- a/src/load_font_node.h +++ b/src/load_font_node.h @@ -32,7 +32,7 @@ class LoadFontNode { public: LoadFontNode () {} - LoadFontNode (std::string id_) + explicit LoadFontNode (std::string id_) : id (id_) {} diff --git a/src/local_time.h b/src/local_time.h index b298268e..9407aeed 100644 --- a/src/local_time.h +++ b/src/local_time.h @@ -44,9 +44,9 @@ class LocalTime { public: LocalTime (); - LocalTime (boost::posix_time::ptime); + explicit LocalTime (boost::posix_time::ptime); LocalTime (boost::posix_time::ptime, int tz_hour, int tz_minute); - LocalTime (std::string); + explicit LocalTime (std::string); std::string as_string (bool with_millisecond = false) const; std::string date () const; diff --git a/src/mono_picture_asset.h b/src/mono_picture_asset.h index 09b774e7..c2079bed 100644 --- a/src/mono_picture_asset.h +++ b/src/mono_picture_asset.h @@ -36,12 +36,12 @@ public: /** Create a MonoPictureAsset by reading a file. * @param file Asset file to read. */ - MonoPictureAsset (boost::filesystem::path file); + explicit MonoPictureAsset (boost::filesystem::path file); /** Create a MonoPictureAsset with a given edit rate. * @param edit_rate Edit rate (i.e. frame rate) in frames per second. */ - MonoPictureAsset (Fraction edit_rate); + explicit MonoPictureAsset (Fraction edit_rate); /** Start a progressive write to a MonoPictureAsset */ boost::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path, Standard standard, bool); diff --git a/src/mono_picture_asset_reader.h b/src/mono_picture_asset_reader.h index b66c6cbe..8c1712cb 100644 --- a/src/mono_picture_asset_reader.h +++ b/src/mono_picture_asset_reader.h @@ -40,7 +40,7 @@ public: private: friend class MonoPictureAsset; - MonoPictureAssetReader (MonoPictureAsset const *); + explicit MonoPictureAssetReader (MonoPictureAsset const *); ASDCP::JP2K::MXFReader* _reader; }; diff --git a/src/mono_picture_frame.h b/src/mono_picture_frame.h index efd7f9a9..ec213ac2 100644 --- a/src/mono_picture_frame.h +++ b/src/mono_picture_frame.h @@ -47,7 +47,7 @@ class OpenJPEGImage; class MonoPictureFrame : public boost::noncopyable { public: - MonoPictureFrame (boost::filesystem::path path); + explicit MonoPictureFrame (boost::filesystem::path path); MonoPictureFrame (uint8_t const * data, int size); ~MonoPictureFrame (); diff --git a/src/object.h b/src/object.h index ff493534..5c5bbc0e 100644 --- a/src/object.h +++ b/src/object.h @@ -39,7 +39,7 @@ class Object : public boost::noncopyable { public: Object (); - Object (std::string id); + explicit Object (std::string id); virtual ~Object () {} /** @return ID */ diff --git a/src/openjpeg_image.h b/src/openjpeg_image.h index 179ab346..3cfa157f 100644 --- a/src/openjpeg_image.h +++ b/src/openjpeg_image.h @@ -34,8 +34,8 @@ namespace dcp { class OpenJPEGImage : public boost::noncopyable { public: - OpenJPEGImage (opj_image_t *); - OpenJPEGImage (Size); + explicit OpenJPEGImage (opj_image_t *); + explicit OpenJPEGImage (Size); ~OpenJPEGImage (); int* data (int) const; diff --git a/src/picture_asset.h b/src/picture_asset.h index 6971d9e1..9039ecee 100644 --- a/src/picture_asset.h +++ b/src/picture_asset.h @@ -47,8 +47,8 @@ class PictureAssetWriter; class PictureAsset : public Asset, public MXF { public: - PictureAsset (boost::filesystem::path file); - PictureAsset (Fraction edit_rate); + explicit PictureAsset (boost::filesystem::path file); + explicit PictureAsset (Fraction edit_rate); virtual boost::shared_ptr<PictureAssetWriter> start_write ( boost::filesystem::path file, @@ -63,7 +63,7 @@ public: , _atmos (atmos) {} - Reel (boost::shared_ptr<const cxml::Node>); + explicit Reel (boost::shared_ptr<const cxml::Node>); boost::shared_ptr<ReelPictureAsset> main_picture () const { return _main_picture; diff --git a/src/reel_asset.h b/src/reel_asset.h index eea60fc8..c2f17d8a 100644 --- a/src/reel_asset.h +++ b/src/reel_asset.h @@ -53,7 +53,7 @@ class ReelAsset : public Object public: ReelAsset (); ReelAsset (boost::shared_ptr<Asset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - ReelAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelAsset (boost::shared_ptr<const cxml::Node>); virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const; virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const; diff --git a/src/reel_atmos_asset.h b/src/reel_atmos_asset.h index 7d541fcb..7ce3865f 100644 --- a/src/reel_atmos_asset.h +++ b/src/reel_atmos_asset.h @@ -39,7 +39,7 @@ class ReelAtmosAsset : public ReelAsset, public ReelMXF { public: ReelAtmosAsset (boost::shared_ptr<AtmosAsset> asset, int64_t entry_point); - ReelAtmosAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelAtmosAsset (boost::shared_ptr<const cxml::Node>); boost::shared_ptr<AtmosAsset> asset () const { return asset_of_type<AtmosAsset> (); diff --git a/src/reel_mono_picture_asset.h b/src/reel_mono_picture_asset.h index e707fc42..2b0b40e3 100644 --- a/src/reel_mono_picture_asset.h +++ b/src/reel_mono_picture_asset.h @@ -39,7 +39,7 @@ class ReelMonoPictureAsset : public ReelPictureAsset public: ReelMonoPictureAsset (); ReelMonoPictureAsset (boost::shared_ptr<MonoPictureAsset> asset, int64_t entry_point); - ReelMonoPictureAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelMonoPictureAsset (boost::shared_ptr<const cxml::Node>); /** @return the MonoPictureAsset that this object refers to */ boost::shared_ptr<const MonoPictureAsset> mono_asset () const { diff --git a/src/reel_mxf.h b/src/reel_mxf.h index 1d4c3263..b56e293e 100644 --- a/src/reel_mxf.h +++ b/src/reel_mxf.h @@ -41,8 +41,8 @@ class ReelMXF { public: ReelMXF () {} - ReelMXF (boost::optional<std::string> key_id); - ReelMXF (boost::shared_ptr<const cxml::Node>); + explicit ReelMXF (boost::optional<std::string> key_id); + explicit ReelMXF (boost::shared_ptr<const cxml::Node>); virtual ~ReelMXF () {} /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */ diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 73be1a1a..ab93e490 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -38,7 +38,7 @@ class ReelPictureAsset : public ReelAsset, public ReelMXF public: ReelPictureAsset (); ReelPictureAsset (boost::shared_ptr<PictureAsset> asset, int64_t entry_point); - ReelPictureAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelPictureAsset (boost::shared_ptr<const cxml::Node>); virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const; virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const; diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index f091b1b7..a2716a51 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -36,7 +36,7 @@ class ReelSoundAsset : public ReelAsset, public ReelMXF { public: ReelSoundAsset (boost::shared_ptr<dcp::SoundAsset> content, int64_t entry_point); - ReelSoundAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelSoundAsset (boost::shared_ptr<const cxml::Node>); void write_to_cpl (xmlpp::Node* node, Standard standard) const; diff --git a/src/reel_stereo_picture_asset.h b/src/reel_stereo_picture_asset.h index ea95710f..a85c10d4 100644 --- a/src/reel_stereo_picture_asset.h +++ b/src/reel_stereo_picture_asset.h @@ -39,7 +39,7 @@ class ReelStereoPictureAsset : public ReelPictureAsset public: ReelStereoPictureAsset (); ReelStereoPictureAsset (boost::shared_ptr<StereoPictureAsset> content, int64_t entry_point); - ReelStereoPictureAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelStereoPictureAsset (boost::shared_ptr<const cxml::Node>); /** @return the StereoPictureAsset that this object refers to */ boost::shared_ptr<const StereoPictureAsset> stereo_asset () const { diff --git a/src/reel_subtitle_asset.h b/src/reel_subtitle_asset.h index 3eff79c4..ee0cf019 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_subtitle_asset.h @@ -38,7 +38,7 @@ class ReelSubtitleAsset : public ReelAsset { public: ReelSubtitleAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); - ReelSubtitleAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelSubtitleAsset (boost::shared_ptr<const cxml::Node>); boost::shared_ptr<SubtitleAsset> asset () const { return asset_of_type<SubtitleAsset> (); @@ -47,12 +47,12 @@ class Ref { public: /** Initialise a Ref with an ID but no shared_ptr */ - Ref (std::string id) + explicit Ref (std::string id) : _id (id) {} /** Initialise a Ref with a shared_ptr to an asset */ - Ref (boost::shared_ptr<Asset> asset) + explicit Ref (boost::shared_ptr<Asset> asset) : _id (asset->id ()) , _asset (asset) {} diff --git a/src/smpte_load_font_node.h b/src/smpte_load_font_node.h index ff6b7523..36c062ce 100644 --- a/src/smpte_load_font_node.h +++ b/src/smpte_load_font_node.h @@ -39,7 +39,7 @@ class SMPTELoadFontNode : public LoadFontNode public: SMPTELoadFontNode () {} SMPTELoadFontNode (std::string id, std::string urn); - SMPTELoadFontNode (boost::shared_ptr<const cxml::Node> node); + explicit SMPTELoadFontNode (boost::shared_ptr<const cxml::Node> node); std::string urn; }; diff --git a/src/smpte_subtitle_asset.h b/src/smpte_subtitle_asset.h index 1a609c61..664052d6 100644 --- a/src/smpte_subtitle_asset.h +++ b/src/smpte_subtitle_asset.h @@ -46,7 +46,7 @@ public: /** @param file File name */ - SMPTESubtitleAsset (boost::filesystem::path file); + explicit SMPTESubtitleAsset (boost::filesystem::path file); bool equals ( boost::shared_ptr<const Asset>, diff --git a/src/sound_asset.h b/src/sound_asset.h index 952ba968..eb357b37 100644 --- a/src/sound_asset.h +++ b/src/sound_asset.h @@ -41,7 +41,7 @@ class SoundAssetReader; class SoundAsset : public Asset, public MXF { public: - SoundAsset (boost::filesystem::path file); + explicit SoundAsset (boost::filesystem::path file); SoundAsset (Fraction edit_rate, int sampling_rate, int channels); boost::shared_ptr<SoundAssetWriter> start_write (boost::filesystem::path file, Standard standard); diff --git a/src/sound_asset_reader.h b/src/sound_asset_reader.h index a9a05eb3..706f7a9e 100644 --- a/src/sound_asset_reader.h +++ b/src/sound_asset_reader.h @@ -40,7 +40,7 @@ public: private: friend class SoundAsset; - SoundAssetReader (SoundAsset const * asset); + explicit SoundAssetReader (SoundAsset const * asset); ASDCP::PCM::MXFReader* _reader; }; diff --git a/src/stereo_picture_asset.h b/src/stereo_picture_asset.h index 4e56989d..043fbc91 100644 --- a/src/stereo_picture_asset.h +++ b/src/stereo_picture_asset.h @@ -30,8 +30,8 @@ class StereoPictureAssetReader; class StereoPictureAsset : public PictureAsset { public: - StereoPictureAsset (boost::filesystem::path file); - StereoPictureAsset (Fraction edit_rate); + explicit StereoPictureAsset (boost::filesystem::path file); + explicit StereoPictureAsset (Fraction edit_rate); /** Start a progressive write to a StereoPictureAsset */ boost::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path file, Standard, bool); diff --git a/src/stereo_picture_asset_reader.h b/src/stereo_picture_asset_reader.h index 288191e8..363a3eb9 100644 --- a/src/stereo_picture_asset_reader.h +++ b/src/stereo_picture_asset_reader.h @@ -40,7 +40,7 @@ public: private: friend class StereoPictureAsset; - StereoPictureAssetReader (StereoPictureAsset const *); + explicit StereoPictureAssetReader (StereoPictureAsset const *); ASDCP::JP2K::MXFSReader* _reader; }; diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h index 06b144f1..dc4c3d83 100644 --- a/src/subtitle_asset.h +++ b/src/subtitle_asset.h @@ -56,7 +56,7 @@ class SubtitleAsset : public Asset { public: SubtitleAsset (); - SubtitleAsset (boost::filesystem::path file); + explicit SubtitleAsset (boost::filesystem::path file); bool equals ( boost::shared_ptr<const Asset>, diff --git a/src/types.h b/src/types.h index 4e42d3ae..26e4bea6 100644 --- a/src/types.h +++ b/src/types.h @@ -140,7 +140,7 @@ class Fraction public: /** Construct a fraction of 0/0 */ Fraction () : numerator (0), denominator (0) {} - Fraction (std::string s); + explicit Fraction (std::string s); /** Construct a fraction with a specified numerator and denominator. * @param n Numerator. * @param d Denominator. @@ -226,7 +226,7 @@ class Colour public: Colour (); Colour (int r_, int g_, int b_); - Colour (std::string argb_hex); + explicit Colour (std::string argb_hex); int r; ///< red component, from 0 to 255 int g; ///< green component, from 0 to 255 |
