summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-20 23:37:57 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-20 23:37:57 +0000
commit4dbc6ef917aeceb906b1ef1caf6911033e7e2c54 (patch)
tree203675d00d5cc004be6205218f835b6d7a10e925 /src/lib/dcpomatic_time.h
parentab32f60c2c9f2ad01dc8d96dc375df256dba0c41 (diff)
Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert()s with thrown exceptions.
Diffstat (limited to 'src/lib/dcpomatic_time.h')
-rw-r--r--src/lib/dcpomatic_time.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h
index 2408bff81..6afce554f 100644
--- a/src/lib/dcpomatic_time.h
+++ b/src/lib/dcpomatic_time.h
@@ -22,6 +22,7 @@
#include "frame_rate_change.h"
#include "safe_stringstream.h"
+#include "dcpomatic_assert.h"
#include <stdint.h>
#include <cmath>
#include <ostream>
@@ -177,7 +178,7 @@ public:
template <class T>
static ContentTime from_frames (int64_t f, T r) {
- assert (r > 0);
+ DCPOMATIC_ASSERT (r > 0);
return ContentTime (f * HZ / r);
}
@@ -281,7 +282,7 @@ public:
template <class T>
static DCPTime from_frames (int64_t f, T r) {
- assert (r > 0);
+ DCPOMATIC_ASSERT (r > 0);
return DCPTime (f * HZ / r);
}