X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcpomatic_time.h;h=6afce554f5231796c60ccb53bd230a5fc18fa010;hb=4dbc6ef917aeceb906b1ef1caf6911033e7e2c54;hp=55476d5b52ad6d5752344dd9a23b70d5f3770fe8;hpb=b6c780d3107557d452c6612d715d01e2be52dbda;p=dcpomatic.git diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h index 55476d5b5..6afce554f 100644 --- a/src/lib/dcpomatic_time.h +++ b/src/lib/dcpomatic_time.h @@ -20,13 +20,14 @@ #ifndef DCPOMATIC_TIME_H #define DCPOMATIC_TIME_H +#include "frame_rate_change.h" +#include "safe_stringstream.h" +#include "dcpomatic_assert.h" +#include #include #include #include #include -#include -#include "frame_rate_change.h" -#include "safe_stringstream.h" class dcpomatic_round_up_test; @@ -61,6 +62,7 @@ public: return rint (_t * r / HZ); } + /** @param r Frames per second */ template void split (T r, int& h, int& m, int& s, int& f) const { @@ -176,7 +178,7 @@ public: template static ContentTime from_frames (int64_t f, T r) { - assert (r > 0); + DCPOMATIC_ASSERT (r > 0); return ContentTime (f * HZ / r); } @@ -280,7 +282,7 @@ public: template static DCPTime from_frames (int64_t f, T r) { - assert (r > 0); + DCPOMATIC_ASSERT (r > 0); return DCPTime (f * HZ / r); }