Merge branch 'master' into 12bit
[dcpomatic.git] / src / lib / content.cc
index 4cdb23e83e0662ec46c5c898df80068cc6d290a3..11a4b21cca3026706911cb0c51ea9230eabc8797 100644 (file)
 #include "ui_signaller.h"
 #include "exceptions.h"
 #include "film.h"
+#include "safe_stringstream.h"
 
 #include "i18n.h"
 
 using std::string;
-using std::stringstream;
 using std::set;
 using std::list;
 using std::cout;
@@ -212,7 +212,7 @@ Content::technical_summary () const
 Time
 Content::length_after_trim () const
 {
-       return max (0L, full_length() - trim_start() - trim_end());
+       return max (int64_t (0), full_length() - trim_start() - trim_end());
 }
 
 /** @param t A time relative to the start of this content (not the position).
@@ -230,7 +230,7 @@ Content::trimmed (Time t) const
 string
 Content::identifier () const
 {
-       stringstream s;
+       SafeStringStream s;
        
        s << Content::digest()
          << "_" << position()