summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-17 14:30:21 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-17 14:30:21 +0100
commit34f2b95c1638a2cfedf21de5a203d6c0b77abf11 (patch)
treebd78b7dbca7d975a89ef9628f6d4b2fd783a39f1 /src/sound_asset.cc
parent81ed0ebb725a7b5fec00ae209ba8b0d70ebc4ee1 (diff)
Use an optional<> where there should be one.
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index e3adff45..11fd4b2f 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -97,15 +97,16 @@ bool
SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
ASDCP::PCM::MXFReader reader_A;
- Kumu::Result_t r = reader_A.OpenRead (file().string().c_str());
+ DCP_ASSERT (file ());
+ Kumu::Result_t r = reader_A.OpenRead (file()->string().c_str());
if (ASDCP_FAILURE (r)) {
- boost::throw_exception (MXFFileError ("could not open MXF file for reading", file().string(), r));
+ boost::throw_exception (MXFFileError ("could not open MXF file for reading", file()->string(), r));
}
ASDCP::PCM::MXFReader reader_B;
- r = reader_B.OpenRead (other->file().string().c_str());
+ r = reader_B.OpenRead (other->file()->string().c_str());
if (ASDCP_FAILURE (r)) {
- boost::throw_exception (MXFFileError ("could not open MXF file for reading", file().string(), r));
+ boost::throw_exception (MXFFileError ("could not open MXF file for reading", other->file()->string(), r));
}
ASDCP::PCM::AudioDescriptor desc_A;