diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-12-20 23:37:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-12-20 23:37:57 +0000 |
| commit | 4dbc6ef917aeceb906b1ef1caf6911033e7e2c54 (patch) | |
| tree | 203675d00d5cc004be6205218f835b6d7a10e925 /src/lib/audio_analysis.cc | |
| parent | ab32f60c2c9f2ad01dc8d96dc375df256dba0c41 (diff) | |
Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert()s with thrown exceptions.
Diffstat (limited to 'src/lib/audio_analysis.cc')
| -rw-r--r-- | src/lib/audio_analysis.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/audio_analysis.cc b/src/lib/audio_analysis.cc index 681917fcf..597c04a22 100644 --- a/src/lib/audio_analysis.cc +++ b/src/lib/audio_analysis.cc @@ -18,6 +18,7 @@ */ #include "audio_analysis.h" +#include "dcpomatic_assert.h" #include "cross.h" #include <boost/filesystem.hpp> #include <stdint.h> @@ -117,14 +118,14 @@ AudioAnalysis::AudioAnalysis (boost::filesystem::path filename) void AudioAnalysis::add_point (int c, AudioPoint const & p) { - assert (c < channels ()); + DCPOMATIC_ASSERT (c < channels ()); _data[c].push_back (p); } AudioPoint AudioAnalysis::get_point (int c, int p) const { - assert (p < points (c)); + DCPOMATIC_ASSERT (p < points (c)); return _data[c][p]; } @@ -137,7 +138,7 @@ AudioAnalysis::channels () const int AudioAnalysis::points (int c) const { - assert (c < channels ()); + DCPOMATIC_ASSERT (c < channels ()); return _data[c].size (); } |
