C++11 cleanup.
authorCarl Hetherington <cth@carlh.net>
Thu, 27 May 2021 12:16:40 +0000 (14:16 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 27 May 2021 12:25:17 +0000 (14:25 +0200)
src/decrypted_kdm.cc
test/decryption_test.cc

index 03c5ea26a25196ce544b932ca4832c9c500a4917..b2d8e61839cdeb4bfc6fa24700c91858a27f6f28 100644 (file)
@@ -264,8 +264,8 @@ DecryptedKDM::DecryptedKDM (
        , _content_title_text (content_title_text)
        , _issue_date (issue_date)
 {
-       for (map<shared_ptr<const ReelFileAsset>, Key>::const_iterator i = keys.begin(); i != keys.end(); ++i) {
-               add_key (i->first->key_type(), i->first->key_id().get(), i->second, cpl_id, Standard::SMPTE);
+       for (auto const& i: keys) {
+               add_key (i.first->key_type(), i.first->key_id().get(), i.second, cpl_id, Standard::SMPTE);
        }
 }
 
index 77f349bd1940c30937ef9df8e3b0c79fd13fece1..26005d1200d6a7c60c753c40304df692a8a9150c 100644 (file)
     files in the program, then also delete it here.
 */
 
-#include "dcp.h"
-#include "mono_picture_frame.h"
+#include "colour_conversion.h"
 #include "cpl.h"
+#include "dcp.h"
 #include "decrypted_kdm.h"
 #include "encrypted_kdm.h"
 #include "mono_picture_asset.h"
 #include "mono_picture_asset_reader.h"
-#include "reel_picture_asset.h"
-#include "reel.h"
-#include "test.h"
+#include "mono_picture_frame.h"
 #include "openjpeg_image.h"
+#include "picture_asset_writer.h"
+#include "reel.h"
+#include "reel_file_asset.h"
+#include "reel_mono_picture_asset.h"
+#include "reel_picture_asset.h"
+#include "reel_sound_asset.h"
+#include "reel_smpte_subtitle_asset.h"
 #include "rgb_xyz.h"
-#include "colour_conversion.h"
+#include "smpte_subtitle_asset.h"
+#include "sound_asset.h"
+#include "sound_asset_writer.h"
 #include "stream_operators.h"
+#include "test.h"
 #include <boost/test/unit_test.hpp>
 #include <boost/scoped_array.hpp>
 
-using std::pair;
-using std::make_pair;
+
 using std::dynamic_pointer_cast;
+using std::make_pair;
+using std::make_shared;
+using std::map;
+using std::pair;
 using std::shared_ptr;
+using std::string;
+using boost::optional;
 using boost::scoped_array;
 
+
 pair<uint8_t*, dcp::Size>
 get_frame (dcp::DCP const & dcp)
 {