summaryrefslogtreecommitdiff
path: root/src/mxf.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-04 21:55:00 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 14:35:31 +0100
commit55686953bfecd42fac24bdf2668920954a8173be (patch)
tree3de0f280ca9b089c629ffd897bbbc25284ced6e7 /src/mxf.h
parent3fd8e16705b3eb4dc08cf9f33a489418b069b90a (diff)
Use boost::optional for key id instead of an empty string.
Diffstat (limited to 'src/mxf.h')
-rw-r--r--src/mxf.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mxf.h b/src/mxf.h
index 9c5b095a..ff480598 100644
--- a/src/mxf.h
+++ b/src/mxf.h
@@ -60,7 +60,7 @@ public:
/** @return true if the data is encrypted */
bool encrypted () const {
- return !_key_id.empty ();
+ return _key_id;
}
/** Set the ID of the key that is used for encryption/decryption.
@@ -70,8 +70,8 @@ public:
_key_id = i;
}
- /** @return the ID of the key used for encryption/decryption, or an empty string */
- std::string key_id () const {
+ /** @return the ID of the key used for encryption/decryption, if there is one */
+ boost::optional<std::string> key_id () const {
return _key_id;
}
@@ -112,8 +112,8 @@ protected:
ASDCP::AESEncContext* _encryption_context;
ASDCP::AESDecContext* _decryption_context;
- /** ID of the key used for encryption/decryption, or an empty string */
- std::string _key_id;
+ /** ID of the key used for encryption/decryption, if there is one */
+ boost::optional<std::string> _key_id;
/** Key used for encryption/decryption, if there is one */
boost::optional<Key> _key;
MXFMetadata _metadata;