Fix/hide some warnings.
authorCarl Hetherington <cth@carlh.net>
Tue, 13 Apr 2021 23:00:05 +0000 (01:00 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 13 Apr 2021 23:00:05 +0000 (01:00 +0200)
63 files changed:
examples/read_dcp.cc
src/array_data.h
src/asset.cc
src/asset_factory.h
src/atmos_asset.h
src/atmos_asset_writer.h
src/certificate_chain.cc
src/cpl.cc
src/cpl.h
src/dcp.cc
src/font_asset.h
src/gamma_transfer_function.h
src/identity_transfer_function.h
src/interop_subtitle_asset.cc
src/key.h
src/language_tag.h
src/modified_gamma_transfer_function.h
src/mono_picture_asset_writer.cc
src/mono_picture_asset_writer.h
src/mono_picture_frame.h
src/picture_asset.h
src/pkl.cc
src/reel_asset.cc
src/reel_atmos_asset.cc
src/reel_closed_caption_asset.cc
src/reel_file_asset.cc
src/reel_interop_closed_caption_asset.cc
src/reel_interop_closed_caption_asset.h
src/reel_interop_subtitle_asset.cc
src/reel_markers_asset.cc
src/reel_markers_asset.h
src/reel_mono_picture_asset.h
src/reel_picture_asset.cc
src/reel_smpte_closed_caption_asset.cc
src/reel_smpte_subtitle_asset.cc
src/reel_sound_asset.cc
src/reel_sound_asset.h
src/reel_stereo_picture_asset.h
src/reel_subtitle_asset.cc
src/s_gamut3_transfer_function.h
src/smpte_subtitle_asset.cc
src/smpte_subtitle_asset.h
src/sound_asset.cc
src/sound_asset.h
src/sound_asset_writer.cc
src/sound_asset_writer.h
src/stereo_picture_asset_writer.h
src/stereo_picture_frame.h
src/subtitle_asset.h
src/subtitle_asset_internal.h
src/types.cc
src/types.h
src/util.h
src/verify.cc
test/asset_test.cc
test/cpl_sar_test.cc
test/interop_load_font_test.cc
test/kdm_test.cc
test/mca_test.cc
test/smpte_load_font_test.cc
test/test.cc
tools/dcprecover.cc
wscript

index 998d0dc4302d9faa19519c2a80ebdcd12faa997c..53607377ebb9953f525585765ecce73dbb73020a 100644 (file)
 #include "openjpeg_image.h"
 #include "colour_conversion.h"
 #include "rgb_xyz.h"
+/* This DISABLE/ENABLE pair is just to ignore some warnings from Magick++.h; they
+ * can be removed.
+ */
+LIBDCP_DISABLE_WARNINGS
 #include <Magick++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/scoped_array.hpp>
 
 /** @file examples/read_dcp.cc
index 69962bf24b3bec5527c75514cef55aa413ee0d4f..da7229bbcce646a3a96b9c2f4d2684e4ff0ef61a 100644 (file)
@@ -71,18 +71,18 @@ public:
 
        virtual ~ArrayData () {}
 
-       uint8_t const * data () const {
+       uint8_t const * data () const override {
                return _data.get();
        }
 
-       uint8_t * data () {
+       uint8_t * data () override {
                return _data.get();
        }
 
        /** @return size of the data in _data, or whatever was last
         *  passed to a set_size() call
         */
-       int size () const {
+       int size () const override {
                return _size;
        }
 
index e68229033c8609b122423b7c44d8809b6dfb6242..6e200b0de2a00748410380b95a2fc31f965e3fa9 100644 (file)
  */
 
 
-#include "raw_convert.h"
 #include "asset.h"
-#include "util.h"
-#include "exceptions.h"
-#include "dcp_assert.h"
 #include "compose.hpp"
+#include "dcp_assert.h"
+#include "exceptions.h"
 #include "pkl.h"
+#include "raw_convert.h"
+#include "util.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/algorithm/string.hpp>
 
 
index 4bab9beecc80764020612ea53eb1ccae428e3a36..2dd04559a664e8e6ce41d2bfcd7b04b0b2570908 100644 (file)
  */
 
 
+#include <boost/filesystem.hpp>
+#include <memory>
+
+
 namespace dcp {
 
 
+class Asset;
+
+
 std::shared_ptr<Asset> asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_mxf_type);
 
 
index 7ee55d922223b8f144ae5690255f62898a96800b..a682ae60314db7da5096f8440084bfa2a652c055 100644 (file)
@@ -65,7 +65,7 @@ public:
        std::shared_ptr<AtmosAssetReader> start_read () const;
 
        static std::string static_pkl_type (Standard);
-       std::string pkl_type (Standard s) const {
+       std::string pkl_type (Standard s) const override {
                return static_pkl_type (s);
        }
 
index f70c42f5208236eb411ef6ed6c23f40506665f20..eebb0d6c28120fa03a129b28f24239994e483fdd 100644 (file)
@@ -64,7 +64,7 @@ class AtmosAssetWriter : public AssetWriter
 public:
        void write (std::shared_ptr<const AtmosFrame> frame);
        void write (uint8_t const * data, int size);
-       bool finalize ();
+       bool finalize () override;
 
 private:
        friend class AtmosAsset;
index 4f86ba0db6275a3db0e0b38b03c06dc0d0dde9fa..5ff9b2943431402d31295be02b257fa3475c7819 100644 (file)
 
 
 #include "certificate_chain.h"
+#include "compose.hpp"
+#include "dcp_assert.h"
 #include "exceptions.h"
 #include "util.h"
-#include "dcp_assert.h"
-#include "compose.hpp"
+#include "warnings.h"
 #include <asdcp/KM_util.h>
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <xmlsec/xmldsig.h>
 #include <xmlsec/dl.h>
 #include <xmlsec/app.h>
index 145ce1cdcc53b273ce48b32a156701bce62dc71d..0eb25052afa4de6d4a1ebb22f5c0348aa978dfb7 100644 (file)
  */
 
 
+#include "certificate_chain.h"
+#include "compose.hpp"
 #include "cpl.h"
-#include "util.h"
-#include "reel.h"
+#include "dcp_assert.h"
+#include "local_time.h"
 #include "metadata.h"
-#include "certificate_chain.h"
-#include "xml.h"
+#include "raw_convert.h"
+#include "reel.h"
+#include "reel_atmos_asset.h"
+#include "reel_closed_caption_asset.h"
 #include "reel_picture_asset.h"
 #include "reel_sound_asset.h"
 #include "reel_subtitle_asset.h"
-#include "reel_closed_caption_asset.h"
-#include "reel_atmos_asset.h"
-#include "local_time.h"
-#include "dcp_assert.h"
-#include "compose.hpp"
-#include "raw_convert.h"
+#include "util.h"
+#include "warnings.h"
+#include "xml.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/Metadata.h>
+LIBDCP_ENABLE_WARNINGS
 #include <libxml/parser.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/algorithm/string.hpp>
 
 
index 246233c1e0a05d141451861226630c3335c89b9b..797c49d266ce6dc3598ef2d73d18e3d24c82e6c9 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -81,7 +81,7 @@ public:
                std::shared_ptr<const Asset> other,
                EqualityOptions options,
                NoteHandler note
-               ) const;
+               ) const override;
 
        /** Add a reel to this CPL
         *  @param reel Reel to add
@@ -307,7 +307,7 @@ public:
 
 protected:
        /** @return type string for PKLs for this asset */
-       std::string pkl_type (Standard standard) const;
+       std::string pkl_type (Standard standard) const override;
 
 private:
        friend struct ::verify_invalid_language3;
index bcf487e1d2c718dfe74f5a59d26db98ddaf5b1c6..c72bef63680f56b71f80ac4aa5cf50b79c1e0d6b 100644 (file)
  */
 
 
-#include "raw_convert.h"
-#include "dcp.h"
-#include "sound_asset.h"
+#include "asset_factory.h"
 #include "atmos_asset.h"
-#include "picture_asset.h"
-#include "interop_subtitle_asset.h"
-#include "smpte_subtitle_asset.h"
-#include "mono_picture_asset.h"
-#include "stereo_picture_asset.h"
-#include "reel_subtitle_asset.h"
-#include "util.h"
-#include "metadata.h"
-#include "exceptions.h"
-#include "cpl.h"
 #include "certificate_chain.h"
 #include "compose.hpp"
+#include "cpl.h"
+#include "dcp.h"
+#include "dcp_assert.h"
 #include "decrypted_kdm.h"
 #include "decrypted_kdm_key.h"
-#include "dcp_assert.h"
-#include "reel_asset.h"
+#include "exceptions.h"
 #include "font_asset.h"
+#include "interop_subtitle_asset.h"
+#include "metadata.h"
+#include "mono_picture_asset.h"
+#include "picture_asset.h"
 #include "pkl.h"
-#include "asset_factory.h"
+#include "raw_convert.h"
+#include "reel_asset.h"
+#include "reel_subtitle_asset.h"
+#include "smpte_subtitle_asset.h"
+#include "sound_asset.h"
+#include "stereo_picture_asset.h"
+#include "util.h"
 #include "verify.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
+LIBDCP_ENABLE_WARNINGS
 #include <xmlsec/xmldsig.h>
 #include <xmlsec/app.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 #include <numeric>
index d39a6b244cd57c002675a1fce3d2bd4c6ec531ed..7d1c5552f7ff0a0f4a249760c1ebb73594570b86 100644 (file)
@@ -54,7 +54,7 @@ public:
        static std::string static_pkl_type (Standard standard);
 
 private:
-       std::string pkl_type (Standard standard) const {
+       std::string pkl_type (Standard standard) const override {
                return static_pkl_type (standard);
        }
 };
index a7bdd44d940e157302ad04df774a78809c964bd8..8402d6af23004add106a03484f50bcfcd90873e8 100644 (file)
@@ -55,10 +55,10 @@ public:
                return _gamma;
        }
 
-       bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const;
+       bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const override;
 
 protected:
-       double * make_lut (int bit_depth, bool inverse) const;
+       double * make_lut (int bit_depth, bool inverse) const override;
 
 private:
        double _gamma;
index ff6814ebdf6b4727070b5b2c2fbb05a515645d8c..de7a897a102f27e78fddd56f7ac62d9e29b9055a 100644 (file)
@@ -46,10 +46,10 @@ namespace dcp {
 class IdentityTransferFunction : public TransferFunction
 {
 public:
-       bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const;
+       bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const override;
 
 protected:
-       double * make_lut (int bit_depth, bool inverse) const;
+       double * make_lut (int bit_depth, bool inverse) const override;
 };
 
 
index 938c028e79239c55adb809d560c67e8b0d5a69ba..453cad8be7ce0aff053c2cad014b3a5817a74f4e 100644 (file)
  */
 
 
-#include "interop_subtitle_asset.h"
+#include "compose.hpp"
+#include "dcp_assert.h"
+#include "font_asset.h"
 #include "interop_load_font_node.h"
-#include "subtitle_asset_internal.h"
-#include "xml.h"
+#include "interop_subtitle_asset.h"
 #include "raw_convert.h"
-#include "util.h"
-#include "font_asset.h"
-#include "dcp_assert.h"
-#include "compose.hpp"
+#include "subtitle_asset_internal.h"
 #include "subtitle_image.h"
+#include "util.h"
+#include "warnings.h"
+#include "xml.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/weak_ptr.hpp>
 #include <cmath>
 #include <cstdio>
index d51150c48ecfd66a5db4c26bd3cc3365ea3a2d67..b0f33d0dedaff0a7c595153842ec848e482fc425 100644 (file)
--- a/src/key.h
+++ b/src/key.h
 #define LIBDCP_KEY_H
 
 
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
+LIBDCP_ENABLE_WARNINGS
 #include <stdint.h>
 #include <string>
 
index d18572e4e5661557b0398a746b930bf2fd7ee866..6b4bebe63c7d43c0fca67adce4e270aa8c29eff3 100644 (file)
@@ -112,7 +112,7 @@ public:
                LanguageSubtag (char const* subtag)
                        : Subtag(subtag, SubtagType::LANGUAGE) {}
 
-               SubtagType type () const {
+               SubtagType type () const override {
                        return SubtagType::LANGUAGE;
                }
        };
@@ -125,7 +125,7 @@ public:
                ScriptSubtag (char const* subtag)
                        : Subtag(subtag, SubtagType::SCRIPT) {}
 
-               SubtagType type () const {
+               SubtagType type () const override {
                        return SubtagType::SCRIPT;
                }
        };
@@ -138,7 +138,7 @@ public:
                RegionSubtag (char const* subtag)
                        : Subtag(subtag, SubtagType::REGION) {}
 
-               SubtagType type () const {
+               SubtagType type () const override {
                        return SubtagType::REGION;
                }
        };
@@ -151,7 +151,7 @@ public:
                VariantSubtag (char const* subtag)
                        : Subtag(subtag, SubtagType::VARIANT) {}
 
-               SubtagType type () const {
+               SubtagType type () const override {
                        return SubtagType::VARIANT;
                }
 
@@ -168,7 +168,7 @@ public:
                ExtlangSubtag (char const* subtag)
                        : Subtag(subtag, SubtagType::EXTLANG) {}
 
-               SubtagType type () const {
+               SubtagType type () const override {
                        return SubtagType::EXTLANG;
                }
 
index 70018cbf6be197529508f3dcd2d15c9a7d1c011a..349048557808801055aa3dd6332dfc91f65d9198 100644 (file)
@@ -74,10 +74,10 @@ public:
                return _B;
        }
 
-       bool about_equal (std::shared_ptr<const TransferFunction>, double epsilon) const;
+       bool about_equal (std::shared_ptr<const TransferFunction>, double epsilon) const override;
 
 protected:
-       double * make_lut (int bit_depth, bool inverse) const;
+       double * make_lut (int bit_depth, bool inverse) const override;
 
 private:
        double _power;
index dec120cb1a548890e713af6b856e877bc671d1be..1abdcccc3a83e2df5c6074426063823764863486 100644 (file)
  */
 
 
-#include "mono_picture_asset_writer.h"
+#include "crypto_context.h"
+#include "dcp_assert.h"
 #include "exceptions.h"
+#include "mono_picture_asset_writer.h"
 #include "picture_asset.h"
-#include "dcp_assert.h"
-#include "crypto_context.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
 #include <asdcp/KM_fileio.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 #include "picture_asset_writer_common.cc"
index 9dffaa24799f25489cc476727fa62ce902db3013..724e4ece357a28de5ead98572506a1ce287affee 100644 (file)
@@ -64,9 +64,9 @@ namespace dcp {
 class MonoPictureAssetWriter : public PictureAssetWriter
 {
 public:
-       FrameInfo write (uint8_t const *, int);
-       void fake_write (int size);
-       bool finalize ();
+       FrameInfo write (uint8_t const *, int) override;
+       void fake_write (int size) override;
+       bool finalize () override;
 
 private:
        friend class MonoPictureAsset;
index 52cf79653344ad715e476d7444f7d2a7d14f70d0..95b0d111d3ad22b6fc47655c0f431b7ffc5ea032 100644 (file)
@@ -87,13 +87,13 @@ public:
        std::shared_ptr<OpenJPEGImage> xyz_image (int reduce = 0) const;
 
        /** @return Pointer to JPEG2000 data */
-       uint8_t const * data () const;
+       uint8_t const * data () const override;
 
        /** @return Pointer to JPEG2000 data */
-       uint8_t* data ();
+       uint8_t* data () override;
 
        /** @return Size of JPEG2000 data in bytes */
-       int size () const;
+       int size () const override;
 
 private:
        /* XXX: this is a bit of a shame, but I tried friend MonoPictureAssetReader and it's
index 6ee3bd24b53662b4b24299b271ef7054f1439899..011dea87f0673c9962c1db6abc6460e7c1b6c8b4 100644 (file)
@@ -140,7 +140,7 @@ protected:
        Fraction _screen_aspect_ratio;
 
 private:
-       std::string pkl_type (Standard standard) const;
+       std::string pkl_type (Standard standard) const override;
 };
 
 
index 9cec68be13539d8288fb0d156ee094544de45cb8..22589b4d19a21962efbd0699e4b4263bc4f60952 100644 (file)
  */
 
 
-#include "pkl.h"
+#include "dcp_assert.h"
 #include "exceptions.h"
-#include "util.h"
+#include "pkl.h"
 #include "raw_convert.h"
-#include "dcp_assert.h"
+#include "util.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <iostream>
 
 
index 1a6a25bee0b19d215cbab3832fd053aa675b4d60..d233ee649ee20a7e8e598e69940bb15491586d8b 100644 (file)
  */
 
 
-#include "raw_convert.h"
-#include "reel_asset.h"
 #include "asset.h"
 #include "compose.hpp"
 #include "dcp_assert.h"
+#include "raw_convert.h"
+#include "reel_asset.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::pair;
index 1df26ce9d4b77dfe377d4249961027fff7434751..fe30cea26d19c30298b74db839d3b591a1f55e85 100644 (file)
 
 #include "atmos_asset.h"
 #include "reel_atmos_asset.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::string;
index 3e4627d3eb3989eb89d0275742525bdcbeed43c2..7d22c0b8ddbda6463917a6e50c45064db21daf13 100644 (file)
  */
 
 
-#include "subtitle_asset.h"
+#include "dcp_assert.h"
 #include "reel_closed_caption_asset.h"
 #include "smpte_subtitle_asset.h"
-#include "dcp_assert.h"
+#include "subtitle_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::string;
index 1ca77b4d764aaf3e05136ec65d8ccf280b1a3f0b..dc8ea21f449e687be939c9ab3c53090484ef7ea2 100644 (file)
 
 #include "asset.h"
 #include "reel_file_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::shared_ptr;
index 3e85b135377f518d89a79eaf7d4c26e12230eab7..be968068eed92f1dfa122502dab0710ab6f5c45e 100644 (file)
 
 
 #include "reel_interop_closed_caption_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::make_pair;
index ec954346ba959707853ada3c3e2b35df10b15ca7..dd60ad7181e167cbc85a45ae304d16f69fcea267 100644 (file)
@@ -65,7 +65,7 @@ public:
        xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const override;
 
 private:
-       std::string cpl_node_name (Standard) const;
+       std::string cpl_node_name (Standard) const override;
        std::pair<std::string, std::string> cpl_node_namespace () const override;
 };
 
index 08ea4bb40a7b9565e67b30278b02bd1e515f1fd5..5f295d53a8b12602c64732ffaa4eea859bfce6cf 100644 (file)
 
 
 #include "reel_interop_subtitle_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::shared_ptr;
index 55a50a68992b2de56be9e6b52ea766d86931034e..0dd3cf29a23f5caded0bf05294925593031f6f32 100644 (file)
  */
 
 
-#include "reel_markers_asset.h"
-#include "raw_convert.h"
 #include "dcp_assert.h"
+#include "raw_convert.h"
+#include "reel_markers_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::string;
index 1eae47ef37023b0e8878a3f94850558db5a8f873..e3fbb96222a9320e08dfa92b22f0c120f0e4b67c 100644 (file)
@@ -51,7 +51,7 @@ public:
        ReelMarkersAsset (Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point);
        explicit ReelMarkersAsset (std::shared_ptr<const cxml::Node>);
 
-       xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const;
+       xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const override;
        bool equals (std::shared_ptr<const ReelMarkersAsset>, EqualityOptions, NoteHandler) const;
 
        void set (Marker, Time);
@@ -62,7 +62,7 @@ public:
        }
 
 protected:
-       std::string cpl_node_name (Standard) const;
+       std::string cpl_node_name (Standard) const override;
 
 private:
        std::map<Marker, Time> _markers;
index 50e904b281bae7f6edb9526bc98a67e6f02be1cd..fb2dff70a4af693912204f3f90222a121774fb6a 100644 (file)
@@ -71,7 +71,7 @@ public:
        }
 
 private:
-       std::string cpl_node_name (Standard standard) const;
+       std::string cpl_node_name (Standard standard) const override;
 };
 
 
index 4f7f863f086ba1fe1a13c588cd3b86038b25e2af..2e51fec5828707f3a60eefe061a0c163956fec91 100644 (file)
  */
 
 
-#include "reel_picture_asset.h"
-#include "picture_asset.h"
+#include "compose.hpp"
 #include "dcp_assert.h"
+#include "picture_asset.h"
 #include "raw_convert.h"
-#include "compose.hpp"
+#include "reel_picture_asset.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <iomanip>
 #include <cmath>
 
index 34fba18b9fea64753349b5f42b5ecaa428978177..a2a68202a997a5e5dff7f94cfeab085d7156e8f5 100644 (file)
 
 
 #include "reel_smpte_closed_caption_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::make_pair;
index 5a7c8c6ca4db79722c6b7902c9655025dd49a2b5..64440547ce036fff99cf7f11eb77a233fae15679 100644 (file)
 
 #include "reel_smpte_subtitle_asset.h"
 #include "smpte_subtitle_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::shared_ptr;
index e944467f130d294fc2216994324fbc2ca6ef709b..76495c78170f0fec7277d263fe6698dc3871b362 100644 (file)
  */
 
 
-#include "reel_sound_asset.h"
 #include "dcp_assert.h"
+#include "reel_sound_asset.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::string;
index 5eee23be47bd3bdfa07755fa06c428d6269c8add..181bf1d9cb2044555d6755e70c001b6b3360df0e 100644 (file)
@@ -68,8 +68,8 @@ public:
        bool equals (std::shared_ptr<const ReelSoundAsset>, EqualityOptions, NoteHandler) const;
 
 private:
-       boost::optional<std::string> key_type () const;
-       std::string cpl_node_name (Standard standard) const;
+       boost::optional<std::string> key_type () const override;
+       std::string cpl_node_name (Standard standard) const override;
 };
 
 
index beedc4a639714853db377c7752628f86c6589481..7cac1c8b01bbf5c72a7158ebb4956a9c3c0329ec 100644 (file)
@@ -71,8 +71,8 @@ public:
        }
 
 private:
-       std::string cpl_node_name (Standard standard) const;
-       std::pair<std::string, std::string> cpl_node_attribute (Standard standard) const;
+       std::string cpl_node_name (Standard standard) const override;
+       std::pair<std::string, std::string> cpl_node_attribute (Standard standard) const override;
 };
 
 
index e3ca20065150c88f8f804aa216f48ba7e9b1f53b..04f5678801b9d65b6fd7604aeb95f6da4b952641 100644 (file)
 
 
 #include "language_tag.h"
-#include "subtitle_asset.h"
 #include "reel_subtitle_asset.h"
 #include "smpte_subtitle_asset.h"
+#include "subtitle_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::string;
index 88a6a65abde8f92e48c4e7060f4a46345d99041a..0d297e8b2d6a6ea925f8db84c0d817625b65c61c 100644 (file)
@@ -46,10 +46,10 @@ namespace dcp {
 class SGamut3TransferFunction : public TransferFunction
 {
 public:
-       bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const;
+       bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const override;
 
 protected:
-       double * make_lut (int bit_depth, bool inverse) const;
+       double * make_lut (int bit_depth, bool inverse) const override;
 };
 
 
index 6c3277ce09cd28d8299daba12157cfd5e8ace9ef..0fa315b905a69484c2966bf77c2da8111bbe2f4a 100644 (file)
  */
 
 
-#include "smpte_subtitle_asset.h"
-#include "smpte_load_font_node.h"
-#include "exceptions.h"
-#include "xml.h"
-#include "raw_convert.h"
-#include "dcp_assert.h"
-#include "util.h"
 #include "compose.hpp"
 #include "crypto_context.h"
+#include "dcp_assert.h"
+#include "exceptions.h"
+#include "raw_convert.h"
+#include "smpte_load_font_node.h"
+#include "smpte_subtitle_asset.h"
 #include "subtitle_image.h"
+#include "util.h"
+#include "warnings.h"
+#include "xml.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
 #include <asdcp/KM_util.h>
 #include <asdcp/KM_log.h>
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/algorithm/string.hpp>
 
 
index 6984b644749e6b77185130a0c2445b5b1cf29ac9..1ece2405c10952028648a4841c79d99915e1ea02 100644 (file)
@@ -83,18 +83,18 @@ public:
                std::shared_ptr<const Asset>,
                EqualityOptions,
                NoteHandler note
-               ) const;
+               ) const override;
 
-       std::vector<std::shared_ptr<LoadFontNode>> load_font_nodes () const;
+       std::vector<std::shared_ptr<LoadFontNode>> load_font_nodes () const override;
 
-       std::string xml_as_string () const;
+       std::string xml_as_string () const override;
 
        /** Write this content to a MXF file */
-       void write (boost::filesystem::path path) const;
+       void write (boost::filesystem::path path) const override;
 
-       void add (std::shared_ptr<Subtitle>);
-       void add_font (std::string id, dcp::ArrayData data);
-       void set_key (Key key);
+       void add (std::shared_ptr<Subtitle>) override;
+       void add_font (std::string id, dcp::ArrayData data) override;
+       void set_key (Key key) override;
 
        void set_content_title_text (std::string t) {
                _content_title_text = t;
@@ -168,7 +168,7 @@ public:
         *  e.g. a time_code_rate of 250 means that a subtitle time of 0:0:0:001
         *  represents 4ms.
         */
-       int time_code_rate () const {
+       int time_code_rate () const override {
                return _time_code_rate;
        }
 
@@ -192,7 +192,7 @@ public:
 
 protected:
 
-       std::string pkl_type (Standard s) const {
+       std::string pkl_type (Standard s) const override {
                return static_pkl_type (s);
        }
 
index 4f0166d8b90aefc5c978b3f552d34116496fa164..04234c23a238fe16c9a9dda4d7f24103a8d31db4 100644 (file)
  */
 
 
-#include "sound_asset.h"
-#include "util.h"
-#include "exceptions.h"
-#include "sound_frame.h"
-#include "sound_asset_writer.h"
-#include "sound_asset_reader.h"
 #include "compose.hpp"
 #include "dcp_assert.h"
+#include "exceptions.h"
+#include "sound_asset.h"
+#include "sound_asset_reader.h"
+#include "sound_asset_writer.h"
+#include "sound_frame.h"
+#include "util.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
 #include <asdcp/KM_fileio.h>
 #include <asdcp/Metadata.h>
+LIBDCP_ENABLE_WARNINGS
 #include <libxml++/nodes/element.h>
 #include <boost/filesystem.hpp>
 #include <stdexcept>
index 79edea96b7992dc15d05d30e319cb2073424a5b2..799e671ce77726616a38d7017d8f4c3106036a2d 100644 (file)
@@ -82,7 +82,7 @@ public:
                std::shared_ptr<const Asset> other,
                EqualityOptions opt,
                NoteHandler note
-               ) const;
+               ) const override;
 
        /** @return number of channels */
        int channels () const {
@@ -115,7 +115,7 @@ private:
                boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate
                );
 
-       std::string pkl_type (Standard standard) const {
+       std::string pkl_type (Standard standard) const override {
                return static_pkl_type (standard);
        }
 
index 0d7d20744b0f1c961f6ab8633d8032511bdaa6bf..5157bc9f786f9a72d1b3e622027089a404ef6e82 100644 (file)
 
 
 #include "bitstream.h"
-#include "sound_asset_writer.h"
-#include "sound_asset.h"
-#include "exceptions.h"
-#include "dcp_assert.h"
 #include "compose.hpp"
 #include "crypto_context.h"
+#include "dcp_assert.h"
+#include "exceptions.h"
+#include "sound_asset.h"
+#include "sound_asset_writer.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/AS_DCP.h>
 #include <asdcp/Metadata.h>
+LIBDCP_ENABLE_WARNINGS
 #include <iostream>
 
 
@@ -136,11 +139,15 @@ SoundAssetWriter::start ()
                if (field == MCASoundField::SEVEN_POINT_ONE) {
                        soundfield->MCATagSymbol = "sg71";
                        soundfield->MCATagName = "7.1DS";
+LIBDCP_DISABLE_WARNINGS
                        soundfield->MCALabelDictionaryID = asdcp_smpte_dict->ul(ASDCP::MDD_DCAudioSoundfield_71);
+LIBDCP_ENABLE_WARNINGS
                } else {
                        soundfield->MCATagSymbol = "sg51";
                        soundfield->MCATagName = "5.1";
+LIBDCP_DISABLE_WARNINGS
                        soundfield->MCALabelDictionaryID = asdcp_smpte_dict->ul(ASDCP::MDD_DCAudioSoundfield_51);
+LIBDCP_ENABLE_WARNINGS
                }
 
                _state->mxf_writer.OP1aHeader().AddChildObject(soundfield);
@@ -167,7 +174,9 @@ SoundAssetWriter::start ()
                        if (auto lang = _asset->language()) {
                                channel->RFC5646SpokenLanguage = *lang;
                        }
+LIBDCP_DISABLE_WARNINGS
                        channel->MCALabelDictionaryID = channel_to_mca_universal_label(dcp_channel, field, asdcp_smpte_dict);
+LIBDCP_ENABLE_WARNINGS
                        _state->mxf_writer.OP1aHeader().AddChildObject(channel);
                        essence_descriptor->SubDescriptors.push_back(channel->InstanceUID);
                }
index b024749f3e776f4601940606da7a3cc905113459..fde56d95026715198d2f538aa93e41388fc6eca5 100644 (file)
@@ -72,7 +72,7 @@ public:
         */
        void write (float const * const *, int);
 
-       bool finalize ();
+       bool finalize () override;
 
 private:
        friend class SoundAsset;
index cf3e2a4e713bd5b709d405961d7ea8667c823436..0a361e41f34d86976846d5b623c6bc461f21c221 100644 (file)
@@ -64,9 +64,9 @@ public:
         *  @param data JPEG2000 data.
         *  @param size Size of data.
         */
-       FrameInfo write (uint8_t const * data, int size);
-       void fake_write (int size);
-       bool finalize ();
+       FrameInfo write (uint8_t const * data, int size) override;
+       void fake_write (int size) override;
+       bool finalize () override;
 
 private:
        friend class StereoPictureAsset;
index c499b8fecf45215e506ce9fd1bcc04b75fe54e7c..096c821a0d45dac88614e5560a05ffda5959b96f 100644 (file)
@@ -83,9 +83,9 @@ public:
        public:
                Part (std::shared_ptr<ASDCP::JP2K::SFrameBuffer> buffer, Eye eye);
 
-               uint8_t const * data () const;
-               uint8_t * data ();
-               int size () const;
+               uint8_t const * data () const override;
+               uint8_t * data () override;
+               int size () const override;
 
        private:
                friend class StereoPictureFrame;
index 0afce3d06a7a74bb975ea0b72e806e385795e974..2c542b6e37145b8b65a56501454b307d9f36f867 100644 (file)
@@ -98,7 +98,7 @@ public:
                std::shared_ptr<const Asset>,
                EqualityOptions,
                NoteHandler note
-               ) const;
+               ) const override;
 
        std::vector<std::shared_ptr<const Subtitle>> subtitles_during (Time from, Time to, bool starting) const;
        std::vector<std::shared_ptr<const Subtitle>> subtitles_in_reel(std::shared_ptr<const dcp::ReelAsset> asset) const;
index c7037dcffae5e65c5afdd6e2ddf5e522769e48fe..9b5bb2da67ea67ad71863ff8cdcab7680089a851 100644 (file)
 
 
 #include "array_data.h"
+#include "dcp_time.h"
 #include "raw_convert.h"
 #include "types.h"
-#include "dcp_time.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 struct take_intersection_test;
@@ -131,7 +134,7 @@ public:
                , text (text_)
        {}
 
-       virtual xmlpp::Element* as_xml (xmlpp::Element* parent, Context &) const;
+       virtual xmlpp::Element* as_xml (xmlpp::Element* parent, Context &) const override;
 
        std::string text;
 };
@@ -149,7 +152,7 @@ public:
                , _direction (direction)
        {}
 
-       xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const;
+       xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const override;
 
 private:
        HAlign _h_align;
@@ -171,7 +174,7 @@ public:
                , _fade_down (fade_down)
        {}
 
-       xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const;
+       xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const override;
 
 private:
        Time _in;
@@ -194,7 +197,7 @@ public:
                , _v_position (v_position)
        {}
 
-       xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const;
+       xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const override;
 
 private:
        ArrayData _png_data;
index 743e72606a5f176617f619e34d88567dd1d12227..12be1b8a051ca8bf32d8574ec027448ac57df7ae 100644 (file)
  */
 
 
-#include "raw_convert.h"
-#include "types.h"
-#include "exceptions.h"
 #include "compose.hpp"
 #include "dcp_assert.h"
+#include "exceptions.h"
+#include "raw_convert.h"
+#include "types.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/algorithm/string.hpp>
 #include <string>
 #include <vector>
index 9dc3e5f539475305d50d84dd6ca0098d5152d75c..e5f4ff7a214c0ca4c20eaaf7cee3200a1ea12c3a 100644 (file)
 #define LIBDCP_TYPES_H
 
 
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/KLV.h>
+LIBDCP_ENABLE_WARNINGS
 #include <memory>
 #include <boost/function.hpp>
 #include <string>
index aa26bfaf80688f28ff2ced1f1c9cce00353866c1..427ab427d1b55c1ca9423639ef2bb0db7b06e170 100644 (file)
 
 
 #include "array_data.h"
-#include "types.h"
 #include "local_time.h"
+#include "types.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/KM_log.h>
-#include <memory>
-#include <boost/function.hpp>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
+#include <boost/function.hpp>
 #include <boost/optional.hpp>
+#include <memory>
 #include <string>
 #include <stdint.h>
 
index a2298f385ce98dae4b93f62d1196d5796ffdcad1..c9d9b24d04e6081663490b77f6d67de1011c836c 100644 (file)
@@ -156,22 +156,22 @@ private:
 class DCPErrorHandler : public ErrorHandler
 {
 public:
-       void warning(const SAXParseException& e)
+       void warning(const SAXParseException& e) override
        {
                maybe_add (XMLValidationError(e));
        }
 
-       void error(const SAXParseException& e)
+       void error(const SAXParseException& e) override
        {
                maybe_add (XMLValidationError(e));
        }
 
-       void fatalError(const SAXParseException& e)
+       void fatalError(const SAXParseException& e) override
        {
                maybe_add (XMLValidationError(e));
        }
 
-       void resetErrors() {
+       void resetErrors() override {
                _errors.clear ();
        }
 
@@ -246,7 +246,7 @@ public:
                add("http://www.smpte-ra.org/schemas/429-10/2008/Main-Stereo-Picture-CPL", "SMPTE-429-10-2008.xsd");
        }
 
-       InputSource* resolveEntity(XMLCh const *, XMLCh const * system_id)
+       InputSource* resolveEntity(XMLCh const *, XMLCh const * system_id) override
        {
                if (!system_id) {
                        return 0;
index a6fa4b33c2ab82e4def497eff012cfd72cd85979..d6257ebc9939d0683c9a9f472e929e852e5b0e3f 100644 (file)
 #include <boost/bind.hpp>
 #include <boost/test/unit_test.hpp>
 
+
 using std::string;
 using std::shared_ptr;
+using std::make_shared;
+
 
 class DummyAsset : public dcp::Asset
 {
 protected:
-       std::string pkl_type (dcp::Standard) const {
+       std::string pkl_type (dcp::Standard) const override {
                return "none";
        }
 };
 
-static void
-note_handler (dcp::NoteType, string)
-{
-
-}
 
 /** Test a few dusty corners of Asset */
 BOOST_AUTO_TEST_CASE (asset_test)
 {
-       shared_ptr<DummyAsset> a (new DummyAsset);
+       auto a = make_shared<DummyAsset>();
        a->_hash = "abc";
-       shared_ptr<DummyAsset> b (new DummyAsset);
+       auto b = make_shared<DummyAsset>();
        b->_hash = "def";
 
-       BOOST_CHECK (!a->equals (b, dcp::EqualityOptions (), boost::bind (&note_handler, _1, _2)));
+       auto ignore = [](dcp::NoteType, string) {};
+
+       BOOST_CHECK (!a->equals(b, dcp::EqualityOptions(), ignore));
 
        b->_hash = "abc";
-       BOOST_CHECK (a->equals (b, dcp::EqualityOptions (), boost::bind (&note_handler, _1, _2)));
+       BOOST_CHECK (a->equals(b, dcp::EqualityOptions(), ignore));
 
        b->_file = "foo/bar/baz";
-       BOOST_CHECK (a->equals (b, dcp::EqualityOptions (), boost::bind (&note_handler, _1, _2)));
+       BOOST_CHECK (a->equals(b, dcp::EqualityOptions(), ignore));
 }
index 65f01900329f8e3bc562fb0cc93755579c2cf238..1bf536868d7b63eb8fa948e3844215bfb2528692 100644 (file)
     files in the program, then also delete it here.
 */
 
+
 #include "cpl.h"
-#include "reel_mono_picture_asset.h"
 #include "mono_picture_asset.h"
+#include "reel_mono_picture_asset.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 
+
 using std::string;
 using std::shared_ptr;
 using std::make_shared;
@@ -47,13 +52,14 @@ check (shared_ptr<dcp::ReelMonoPictureAsset> pa, dcp::Fraction far, string sar)
 {
        pa->set_screen_aspect_ratio (far);
        xmlpp::Document doc;
-       xmlpp::Element* el = doc.create_root_node ("Test");
+       auto el = doc.create_root_node ("Test");
        pa->write_to_cpl (el, dcp::Standard::INTEROP);
 
        cxml::Node node (el);
        BOOST_CHECK_EQUAL (node.node_child("MainPicture")->string_child ("ScreenAspectRatio"), sar);
 }
 
+
 /** Test for a reported bug where <ScreenAspectRatio> in Interop files uses
  *  excessive decimal places and (sometimes) the wrong decimal point character.
  *  Also check that we correctly use one of the allowed <ScreenAspectRatio>
@@ -66,38 +72,38 @@ BOOST_AUTO_TEST_CASE (cpl_sar)
                );
 
        /* Easy ones */
-       check (pa, dcp::Fraction (1998, 1080), "1.85");
-       check (pa, dcp::Fraction (2048, 858), "2.39");
+       check (pa, dcp::Fraction(1998, 1080), "1.85");
+       check (pa, dcp::Fraction(2048, 858), "2.39");
 
        /* Check the use of the allowed values */
 
        /* Just less then, equal to and just more than 1.33 */
-       check (pa, dcp::Fraction (1200, 1000), "1.33");
-       check (pa, dcp::Fraction (1330, 1000), "1.33");
-       check (pa, dcp::Fraction (1430, 1000), "1.33");
+       check (pa, dcp::Fraction(1200, 1000), "1.33");
+       check (pa, dcp::Fraction(1330, 1000), "1.33");
+       check (pa, dcp::Fraction(1430, 1000), "1.33");
 
        /* Same for 1.66 */
-       check (pa, dcp::Fraction (1600, 1000), "1.66");
-       check (pa, dcp::Fraction (1660, 1000), "1.66");
-       check (pa, dcp::Fraction (1670, 1000), "1.66");
+       check (pa, dcp::Fraction(1600, 1000), "1.66");
+       check (pa, dcp::Fraction(1660, 1000), "1.66");
+       check (pa, dcp::Fraction(1670, 1000), "1.66");
 
        /* 1.77 */
-       check (pa, dcp::Fraction (1750, 1000), "1.77");
-       check (pa, dcp::Fraction (1770, 1000), "1.77");
-       check (pa, dcp::Fraction (1800, 1000), "1.77");
+       check (pa, dcp::Fraction(1750, 1000), "1.77");
+       check (pa, dcp::Fraction(1770, 1000), "1.77");
+       check (pa, dcp::Fraction(1800, 1000), "1.77");
 
        /* 1.85 */
-       check (pa, dcp::Fraction (1820, 1000), "1.85");
-       check (pa, dcp::Fraction (1850, 1000), "1.85");
-       check (pa, dcp::Fraction (1910, 1000), "1.85");
+       check (pa, dcp::Fraction(1820, 1000), "1.85");
+       check (pa, dcp::Fraction(1850, 1000), "1.85");
+       check (pa, dcp::Fraction(1910, 1000), "1.85");
 
        /* 2.00 */
-       check (pa, dcp::Fraction (1999, 1000), "2.00");
-       check (pa, dcp::Fraction (2000, 1000), "2.00");
-       check (pa, dcp::Fraction (2001, 1000), "2.00");
+       check (pa, dcp::Fraction(1999, 1000), "2.00");
+       check (pa, dcp::Fraction(2000, 1000), "2.00");
+       check (pa, dcp::Fraction(2001, 1000), "2.00");
 
        /* 2.39 */
-       check (pa, dcp::Fraction (2350, 1000), "2.39");
-       check (pa, dcp::Fraction (2390, 1000), "2.39");
-       check (pa, dcp::Fraction (2500, 1000), "2.39");
+       check (pa, dcp::Fraction(2350, 1000), "2.39");
+       check (pa, dcp::Fraction(2390, 1000), "2.39");
+       check (pa, dcp::Fraction(2500, 1000), "2.39");
 }
index 0a5a0f6c5af3fb5c374b6561e0125d034df8a699..50e53a0797e3a381324ec2656bb0c18d87b883cd 100644 (file)
     files in the program, then also delete it here.
 */
 
+
 #include "interop_load_font_node.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 
+
+using std::make_shared;
+
+
 /** Test dcp::InteropLoadFont's simple constructor */
 BOOST_AUTO_TEST_CASE (interop_load_font_test1)
 {
@@ -52,7 +60,7 @@ BOOST_AUTO_TEST_CASE (interop_load_font_test2)
 
        text->set_attribute("Id", "my-great-id");
        text->set_attribute("URI", "my-great-uri");
-       dcp::InteropLoadFontNode lf (cxml::ConstNodePtr (new cxml::Node (text)));
+       dcp::InteropLoadFontNode lf (make_shared<cxml::Node>(text));
 
        BOOST_CHECK_EQUAL (lf.id, "my-great-id");
 }
@@ -65,7 +73,7 @@ BOOST_AUTO_TEST_CASE (interop_load_font_test3)
 
        text->set_attribute("ID", "my-great-id");
        text->set_attribute("URI", "my-great-uri");
-       dcp::InteropLoadFontNode lf (cxml::ConstNodePtr (new cxml::Node (text)));
+       dcp::InteropLoadFontNode lf (make_shared<cxml::Node>(text));
 
        BOOST_CHECK_EQUAL (lf.id, "my-great-id");
 }
index ce589a8c80896a74884f9405ff1fe2c0421d8b29..5b0ae6222031565f700fc1dcf1c167d066f48526 100644 (file)
     files in the program, then also delete it here.
 */
 
-#include "encrypted_kdm.h"
-#include "decrypted_kdm.h"
+
 #include "certificate_chain.h"
-#include "util.h"
-#include "test.h"
 #include "cpl.h"
+#include "decrypted_kdm.h"
+#include "encrypted_kdm.h"
 #include "mono_picture_asset.h"
-#include "reel_mono_picture_asset.h"
+#include "picture_asset_writer.h"
 #include "reel.h"
+#include "reel_mono_picture_asset.h"
+#include "test.h"
 #include "types.h"
-#include "picture_asset_writer.h"
+#include "util.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 
+
 using std::list;
 using std::string;
 using std::vector;
@@ -53,6 +58,7 @@ using std::make_shared;
 using std::shared_ptr;
 using boost::optional;
 
+
 /** Check reading and decryption of a KDM */
 BOOST_AUTO_TEST_CASE (kdm_test)
 {
@@ -76,6 +82,7 @@ BOOST_AUTO_TEST_CASE (kdm_test)
        BOOST_CHECK_EQUAL (keys.back().key().hex(), "5327fb7ec2e807bd57059615bf8a169d");
 }
 
+
 /** Check that we can read in a KDM and then write it back out again the same */
 BOOST_AUTO_TEST_CASE (kdm_passthrough_test)
 {
@@ -94,6 +101,7 @@ BOOST_AUTO_TEST_CASE (kdm_passthrough_test)
                );
 }
 
+
 /** Test some of the utility methods of DecryptedKDM */
 BOOST_AUTO_TEST_CASE (decrypted_kdm_test)
 {
@@ -124,6 +132,7 @@ BOOST_AUTO_TEST_CASE (decrypted_kdm_test)
        delete[] data;
 }
 
+
 /** Check that <KeyType> tags have the scope attribute.
  *  Wolfgang Woehl believes this is compulsory and I am more-or-less inclined to agree.
  */
@@ -149,6 +158,7 @@ BOOST_AUTO_TEST_CASE (kdm_key_type_scope)
        }
 }
 
+
 static cxml::ConstNodePtr
 kdm_forensic_test (cxml::Document& doc, bool picture, optional<int> audio)
 {
@@ -177,6 +187,7 @@ kdm_forensic_test (cxml::Document& doc, bool picture, optional<int> audio)
                optional_node_child("ForensicMarkFlagList");
 }
 
+
 /** Check ForensicMarkFlagList handling: disable picture and all audio */
 BOOST_AUTO_TEST_CASE (kdm_forensic_test1)
 {
@@ -189,6 +200,7 @@ BOOST_AUTO_TEST_CASE (kdm_forensic_test1)
        BOOST_CHECK_EQUAL (flags.back()->content(), "http://www.smpte-ra.org/430-1/2006/KDM#mrkflg-audio-disable");
 }
 
+
 /** Check ForensicMarkFlagList handling: disable picture but not audio */
 BOOST_AUTO_TEST_CASE (kdm_forensic_test2)
 {
@@ -200,6 +212,7 @@ BOOST_AUTO_TEST_CASE (kdm_forensic_test2)
        BOOST_CHECK_EQUAL (flags.front()->content(), "http://www.smpte-ra.org/430-1/2006/KDM#mrkflg-picture-disable");
 }
 
+
 /** Check ForensicMarkFlagList handling: disable audio but not picture */
 BOOST_AUTO_TEST_CASE (kdm_forensic_test3)
 {
@@ -211,6 +224,7 @@ BOOST_AUTO_TEST_CASE (kdm_forensic_test3)
        BOOST_CHECK_EQUAL (flags.front()->content(), "http://www.smpte-ra.org/430-1/2006/KDM#mrkflg-audio-disable");
 }
 
+
 /** Check ForensicMarkFlagList handling: disable picture and audio above channel 3 */
 BOOST_AUTO_TEST_CASE (kdm_forensic_test4)
 {
@@ -223,6 +237,7 @@ BOOST_AUTO_TEST_CASE (kdm_forensic_test4)
        BOOST_CHECK_EQUAL (flags.back()->content(), "http://www.smpte-ra.org/430-1/2006/KDM#mrkflg-audio-disable-above-channel-3");
 }
 
+
 /** Check ForensicMarkFlagList handling: disable neither */
 BOOST_AUTO_TEST_CASE (kdm_forensic_test5)
 {
@@ -231,6 +246,7 @@ BOOST_AUTO_TEST_CASE (kdm_forensic_test5)
        BOOST_CHECK (!forensic);
 }
 
+
 /** Check that KDM validity periods are checked for being within the certificate validity */
 BOOST_AUTO_TEST_CASE (validity_period_test1)
 {
index decbf581244e499922493ea14a28503d945551cf..bcedce78fd64fffc482cada54f567000127a8343 100644 (file)
 #include "sound_asset.h"
 #include "sound_asset_writer.h"
 #include "test.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 
 
index a9cc327d9df9d2404a60139245e7a515d3886e02..adcbb0aa8431e8df955ae47367ac94cb1eb7f920 100644 (file)
     files in the program, then also delete it here.
 */
 
+
 #include "smpte_load_font_node.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 
+
+using std::make_shared;
+
+
 /** Test dcp::SMPTELoadFontNode */
 BOOST_AUTO_TEST_CASE (smpte_load_font_test1)
 {
        xmlpp::Document doc;
-       xmlpp::Element* text = doc.create_root_node("Font");
+       auto text = doc.create_root_node("Font");
 
        text->set_attribute ("ID", "my-great-id");
        text->add_child_text ("urn:uuid:my-great-urn");
-       dcp::SMPTELoadFontNode lf (cxml::ConstNodePtr (new cxml::Node (text)));
+       dcp::SMPTELoadFontNode lf (make_shared<cxml::Node>(text));
 
        BOOST_CHECK_EQUAL (lf.id, "my-great-id");
        BOOST_CHECK_EQUAL (lf.urn, "my-great-urn");
index d46c657b9fd3fe9a543ad7253254bf892609c58c..3cb40aaf424f169aa19759720b49c5561884dc38 100644 (file)
 #include "sound_asset_writer.h"
 #include "test.h"
 #include "util.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
 #include <asdcp/KM_util.h>
 #include <asdcp/KM_prng.h>
+LIBDCP_ENABLE_WARNINGS
 #include <sndfile.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 #include <cstdio>
 #include <iostream>
index f78b246ce3067e07aad4e95664fd4786c77beb73..840a671142caa58b5caed29ca3d345e8e4ca1782 100644 (file)
     files in the program, then also delete it here.
 */
 
-#include "dcp.h"
+
+#include "asset_factory.h"
 #include "cpl.h"
+#include "dcp.h"
 #include "exceptions.h"
-#include "asset_factory.h"
 #include "reel_asset.h"
+#include "warnings.h"
 #include <getopt.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
 #include <iostream>
 
+
 using std::cerr;
 using std::cout;
-using std::string;
+using std::make_shared;
 using std::shared_ptr;
+using std::string;
 using std::vector;
 using boost::optional;
 
+
 static void
 help (string n)
 {
@@ -56,11 +63,13 @@ help (string n)
             << "  -o, --output       output DCP directory\n";
 }
 
+
 void progress (float f)
 {
        cout << (f * 100) << "%               \r";
 }
 
+
 int
 main (int argc, char* argv[])
 {
@@ -115,10 +124,10 @@ main (int argc, char* argv[])
        /* Look for a CPL */
 
        shared_ptr<dcp::CPL> cpl;
-       for (boost::filesystem::directory_iterator i(dcp_dir); i != boost::filesystem::directory_iterator(); ++i) {
-               if (i->path().extension() == ".xml") {
+       for (auto i: boost::filesystem::directory_iterator(dcp_dir)) {
+               if (i.path().extension() == ".xml") {
                        try {
-                               cpl.reset(new dcp::CPL(i->path()));
+                               cpl = make_shared<dcp::CPL>(i.path());
                        } catch (dcp::ReadError& e) {
                                cout << "Error: " << e.what() << "\n";
                        } catch (xmlpp::parse_error& e) {
@@ -137,12 +146,12 @@ main (int argc, char* argv[])
 
                /* Read all MXF assets */
                vector<shared_ptr<dcp::Asset>> assets;
-               for (boost::filesystem::directory_iterator i(dcp_dir); i != boost::filesystem::directory_iterator(); ++i) {
-                       if (i->path().extension() == ".mxf") {
+               for (auto i: boost::filesystem::directory_iterator(dcp_dir)) {
+                       if (i.path().extension() == ".mxf") {
                                try {
-                                       shared_ptr<dcp::Asset> asset = dcp::asset_factory(i->path(), true);
-                                       asset->set_file (*output / i->path().filename());
-                                       cout << "Hashing " << i->path().filename() << "\n";
+                                       auto asset = dcp::asset_factory(i.path(), true);
+                                       asset->set_file (*output / i.path().filename());
+                                       cout << "Hashing " << i.path().filename() << "\n";
                                        asset->hash (&progress);
                                        cout << "100%                     \n";
                                        assets.push_back (asset);
diff --git a/wscript b/wscript
index f8c945eb4e2a080ef184191d90604fb682870da7..732ec2eb2a708bcac646c92df1ad970f487708e7 100644 (file)
--- a/wscript
+++ b/wscript
@@ -66,7 +66,7 @@ def options(opt):
 def configure(conf):
     conf.load('compiler_cxx')
     conf.load('clang_compilation_database', tooldir=['waf-tools'])
-    conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-D_FILE_OFFSET_BITS=64', '-D__STDC_FORMAT_MACROS', '-std=c++11'])
+    conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-Wsuggest-override', '-D_FILE_OFFSET_BITS=64', '-D__STDC_FORMAT_MACROS', '-std=c++11'])
     gcc = conf.env['CC_VERSION']
     if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
         conf.env.append_value('CXXFLAGS', ['-Wno-maybe-uninitialized'])