Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert...
[dcpomatic.git] / src / lib / util.cc
index 502393094b1e6b1989ab3d853280faf465de8835..0cdfe0b0c6c59fd37eb8e3d222ad4d07ec766ebf 100644 (file)
@@ -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