Some include tidying.
[dcpomatic.git] / src / lib / dcpomatic_time.h
index 4c7ea4ba52d524746ac9acb064ae6700d0d8ca35..2408bff812991dd8da237499eeb6509c9ba76fa2 100644 (file)
 #ifndef DCPOMATIC_TIME_H
 #define DCPOMATIC_TIME_H
 
+#include "frame_rate_change.h"
+#include "safe_stringstream.h"
+#include <stdint.h>
 #include <cmath>
 #include <ostream>
 #include <sstream>
 #include <iomanip>
-#include <stdint.h>
-#include "frame_rate_change.h"
 
 class dcpomatic_round_up_test;
 
@@ -60,6 +61,7 @@ public:
                return rint (_t * r / HZ);
        }
 
+       /** @param r Frames per second */
        template <typename T>
        void split (T r, int& h, int& m, int& s, int& f) const
        {
@@ -86,7 +88,7 @@ public:
                int f;
                split (r, h, m, s, f);
 
-               std::ostringstream o;
+               SafeStringStream o;
                o.width (2);
                o.fill ('0');
                o << std::setw(2) << std::setfill('0') << h << ":"