diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-04 21:55:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-05 14:35:31 +0100 |
| commit | 55686953bfecd42fac24bdf2668920954a8173be (patch) | |
| tree | 3de0f280ca9b089c629ffd897bbbc25284ced6e7 /src/mxf.h | |
| parent | 3fd8e16705b3eb4dc08cf9f33a489418b069b90a (diff) | |
Use boost::optional for key id instead of an empty string.
Diffstat (limited to 'src/mxf.h')
| -rw-r--r-- | src/mxf.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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; |
