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/util.cc | |
| parent | ab32f60c2c9f2ad01dc8d96dc375df256dba0c41 (diff) | |
Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert()s with thrown exceptions.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 502393094..0cdfe0b0c 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -708,7 +708,7 @@ stride_round_up (int c, int const * stride, int t) int round_to (float n, int r) { - assert (r == 1 || r == 2 || r == 4); + DCPOMATIC_ASSERT (r == 1 || r == 2 || r == 4); return int (n + float(r) / 2) &~ (r - 1); } @@ -813,13 +813,13 @@ get_optional_int (multimap<string, string> const & kv, string k) void ensure_ui_thread () { - assert (boost::this_thread::get_id() == ui_thread); + DCPOMATIC_ASSERT (boost::this_thread::get_id() == ui_thread); } string audio_channel_name (int c) { - assert (MAX_DCP_AUDIO_CHANNELS == 12); + DCPOMATIC_ASSERT (MAX_DCP_AUDIO_CHANNELS == 12); /// TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency /// enhancement channel (sub-woofer). HI is the hearing-impaired audio track and |
