summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-26 00:32:29 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-26 00:32:29 +0200
commitc4c176e9d3bd72fe1746f22d7afb442ca72a72f2 (patch)
tree99afbe339ab115c33eceb29f6083695c062587ce /src
parent5c56edb56a36a06c3ea12b1df67f5ad45983cb0d (diff)
Add move constructor/operator=.dcp-editor3
Diffstat (limited to 'src')
-rw-r--r--src/dcp.cc29
-rw-r--r--src/dcp.h3
2 files changed, 32 insertions, 0 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index ff51a28f..8924a4b8 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -106,6 +106,35 @@ DCP::DCP (boost::filesystem::path directory)
}
+DCP::DCP(DCP&& other)
+ : _directory(std::move(other._directory))
+ , _cpls(std::move(other._cpls))
+ , _pkls(std::move(other._pkls))
+ , _asset_map(std::move(other._asset_map))
+ , _new_issuer(std::move(other._new_issuer))
+ , _new_creator(std::move(other._new_creator))
+ , _new_issue_date(std::move(other._new_issue_date))
+ , _new_annotation_text(std::move(other._new_annotation_text))
+{
+
+}
+
+
+DCP&
+DCP::operator=(DCP&& other)
+{
+ _directory = std::move(other._directory);
+ _cpls = std::move(other._cpls);
+ _pkls = std::move(other._pkls);
+ _asset_map = std::move(other._asset_map);
+ _new_issuer = std::move(other._new_issuer);
+ _new_creator = std::move(other._new_creator);
+ _new_issue_date = std::move(other._new_issue_date);
+ _new_annotation_text = std::move(other._new_annotation_text);
+ return *this;
+}
+
+
void
DCP::read (vector<dcp::VerificationNote>* notes, bool ignore_incorrect_picture_mxf_type)
{
diff --git a/src/dcp.h b/src/dcp.h
index c08ccf38..35e2edf8 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -95,6 +95,9 @@ public:
DCP (DCP const&) = delete;
DCP& operator= (DCP const&) = delete;
+ DCP (DCP &&);
+ DCP& operator= (DCP &&);
+
/** Read a DCP. This method does not do any deep checking of the DCP's validity, but
* if it comes across any bad things it will do one of two things.
*