projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e97157f
)
C++11 tidying.
author
Carl Hetherington
<cth@carlh.net>
Wed, 14 Jul 2021 00:02:17 +0000
(
02:02
+0200)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 14 Jul 2021 00:02:17 +0000
(
02:02
+0200)
src/reel_picture_asset.h
patch
|
blob
|
history
src/subtitle.h
patch
|
blob
|
history
test/atmos_test.cc
patch
|
blob
|
history
test/local_time_test.cc
patch
|
blob
|
history
test/make_digest_test.cc
patch
|
blob
|
history
test/mca_test.cc
patch
|
blob
|
history
tools/common.cc
patch
|
blob
|
history
tools/dcpkdm.cc
patch
|
blob
|
history
diff --git
a/src/reel_picture_asset.h
b/src/reel_picture_asset.h
index e79c44551ea2202b9adbe31d51379400b5141533..64fa54f4e92a709d1f89442195534626605883f8 100644
(file)
--- a/
src/reel_picture_asset.h
+++ b/
src/reel_picture_asset.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2014-20
19
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-20
21
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
diff --git
a/src/subtitle.h
b/src/subtitle.h
index e0132dbe8a99152792a4d5fd739b14cd6dc45559..c6a628b8780a28eb8cbb2557f7dd9f5120c0093e 100644
(file)
--- a/
src/subtitle.h
+++ b/
src/subtitle.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2012-20
18
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-20
21
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
diff --git
a/test/atmos_test.cc
b/test/atmos_test.cc
index 1ac0e1f178cd56762884290f30d1889a75d7cdd8..a56de7af05c08abfcf1d02335fd43531aea86675 100644
(file)
--- a/
test/atmos_test.cc
+++ b/
test/atmos_test.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2015-20
19
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-20
21
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
@@
-31,11
+31,13
@@
files in the program, then also delete it here.
*/
files in the program, then also delete it here.
*/
+
#include "atmos_asset.h"
#include "test.h"
#include <boost/test/unit_test.hpp>
#include <iostream>
#include "atmos_asset.h"
#include "test.h"
#include <boost/test/unit_test.hpp>
#include <iostream>
+
/** Check basic read of an Atmos asset */
BOOST_AUTO_TEST_CASE (atmos_read_test)
{
/** Check basic read of an Atmos asset */
BOOST_AUTO_TEST_CASE (atmos_read_test)
{
diff --git
a/test/local_time_test.cc
b/test/local_time_test.cc
index 4ac922408fd1a7d7e2003e531695d30baa1d464b..e80a863d91fdc59b7be4a75e9464dfa18206b36e 100644
(file)
--- a/
test/local_time_test.cc
+++ b/
test/local_time_test.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2014-202
0
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-202
1
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
@@
-31,9
+31,11
@@
files in the program, then also delete it here.
*/
files in the program, then also delete it here.
*/
-#include <boost/test/unit_test.hpp>
-#include "local_time.h"
+
#include "exceptions.h"
#include "exceptions.h"
+#include "local_time.h"
+#include <boost/test/unit_test.hpp>
+
/** Check that dcp::LocalTime works */
BOOST_AUTO_TEST_CASE (local_time_basic_test)
/** Check that dcp::LocalTime works */
BOOST_AUTO_TEST_CASE (local_time_basic_test)
@@
-139,6
+141,7
@@
BOOST_AUTO_TEST_CASE (local_time_basic_test)
}
}
}
}
+
BOOST_AUTO_TEST_CASE (local_time_add_minutes_test)
{
{
BOOST_AUTO_TEST_CASE (local_time_add_minutes_test)
{
{
diff --git
a/test/make_digest_test.cc
b/test/make_digest_test.cc
index 7fefd80968ecb17874b0e12a851b29b7df2eb518..9d37f837cd34e360e2be02da717245c3d40d4b59 100644
(file)
--- a/
test/make_digest_test.cc
+++ b/
test/make_digest_test.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2016-20
19
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-20
21
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
@@
-38,11
+38,13
@@
#include <boost/test/unit_test.hpp>
#include <sys/time.h>
#include <boost/test/unit_test.hpp>
#include <sys/time.h>
+
void progress (float)
{
}
void progress (float)
{
}
+
/** Check SHA1 digests */
BOOST_AUTO_TEST_CASE (make_digest_test)
{
/** Check SHA1 digests */
BOOST_AUTO_TEST_CASE (make_digest_test)
{
@@
-50,12
+52,12
@@
BOOST_AUTO_TEST_CASE (make_digest_test)
srand (1);
int const N = 256 * 1024 * 1024;
dcp::ArrayData data (N);
srand (1);
int const N = 256 * 1024 * 1024;
dcp::ArrayData data (N);
-
uint8_t*
p = data.data();
+
auto
p = data.data();
for (int i = 0; i < N; ++i) {
*p++ = rand() & 0xff;
}
data.write ("build/test/random");
/* Hash it */
for (int i = 0; i < N; ++i) {
*p++ = rand() & 0xff;
}
data.write ("build/test/random");
/* Hash it */
- BOOST_CHECK_EQUAL (dcp::make_digest
("build/test/random", boost::bind
(&progress, _1)), "GKbk/V3fcRtP5MaPdSmAGNbKkaU=");
+ BOOST_CHECK_EQUAL (dcp::make_digest
("build/test/random", boost::bind
(&progress, _1)), "GKbk/V3fcRtP5MaPdSmAGNbKkaU=");
}
}
diff --git
a/test/mca_test.cc
b/test/mca_test.cc
index bcedce78fd64fffc482cada54f567000127a8343..12b4f2c6f21c0a15db47adb980b872078ba0f78c 100644
(file)
--- a/
test/mca_test.cc
+++ b/
test/mca_test.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2020
-2021
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
@@
-114,8
+114,8
@@
BOOST_AUTO_TEST_CASE (write_mca_descriptors_to_mxf_test)
/* Make a CPL as a roundabout way to read the metadata we just wrote to the MXF */
/* Make a CPL as a roundabout way to read the metadata we just wrote to the MXF */
-
shared_ptr<dcp::ReelSoundAsset> reel_sound_asset(new dcp::ReelSoundAsset(sound_asset, 0)
);
-
shared_ptr<dcp::Reel> reel(new dcp::Reel()
);
+
auto reel_sound_asset = make_shared<dcp::ReelSoundAsset>(sound_asset, 0
);
+
auto reel = make_shared<dcp::Reel>(
);
reel->add (black_picture_asset("build/test/write_mca_descriptors_to_mxf_test", 24));
reel->add (reel_sound_asset);
reel->add (black_picture_asset("build/test/write_mca_descriptors_to_mxf_test", 24));
reel->add (reel_sound_asset);
diff --git
a/tools/common.cc
b/tools/common.cc
index 54bee6b5c9a1f217983c9c8ac8b665680f2ec15a..13ce9cb0f9092eaff20720095509c2fa0ebe2bd1 100644
(file)
--- a/
tools/common.cc
+++ b/
tools/common.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014
-2021
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
@@
-31,13
+31,15
@@
files in the program, then also delete it here.
*/
files in the program, then also delete it here.
*/
+
#include "common.h"
#include "dcp.h"
#include "common.h"
#include "dcp.h"
-using std::dynamic_pointer_cast;
+
using std::shared_ptr;
using std::vector;
using std::shared_ptr;
using std::vector;
+
void
dcp::filter_notes (vector<dcp::VerificationNote>& notes, bool ignore_missing_assets)
{
void
dcp::filter_notes (vector<dcp::VerificationNote>& notes, bool ignore_missing_assets)
{
@@
-52,3
+54,4
@@
dcp::filter_notes (vector<dcp::VerificationNote>& notes, bool ignore_missing_ass
notes = filtered;
}
notes = filtered;
}
+
diff --git
a/tools/dcpkdm.cc
b/tools/dcpkdm.cc
index a3e099ba254ebfa69ed7ac9642564a7cfaec2da6..20b07ebca513b1476fe2872fccd87b514c91cb0e 100644
(file)
--- a/
tools/dcpkdm.cc
+++ b/
tools/dcpkdm.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2017-20
19
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-20
21
Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
This file is part of libdcp.
@@
-31,18
+31,21
@@
files in the program, then also delete it here.
*/
files in the program, then also delete it here.
*/
-#include "encrypted_kdm.h"
+
+#include "certificate_chain.h"
#include "decrypted_kdm.h"
#include "decrypted_kdm.h"
-#include "
util
.h"
+#include "
encrypted_kdm
.h"
#include "exceptions.h"
#include "exceptions.h"
-#include "
certificate_chain
.h"
+#include "
util
.h"
#include <getopt.h>
#include <getopt.h>
-using std::string;
-using std::cout;
+
using std::cerr;
using std::cerr;
+using std::cout;
+using std::string;
using boost::optional;
using boost::optional;
+
static void
help (string n)
{
static void
help (string n)
{
@@
-51,6
+54,7
@@
help (string n)
<< " -p, --private-key private key file\n";
}
<< " -p, --private-key private key file\n";
}
+
static string
tm_to_string (struct tm t)
{
static string
tm_to_string (struct tm t)
{
@@
-59,6
+63,7
@@
tm_to_string (struct tm t)
return buffer;
}
return buffer;
}
+
int
main (int argc, char* argv[])
try
int
main (int argc, char* argv[])
try