Merge master.
[dcpomatic.git] / src / lib / film.cc
index 0891838ff930674548ea90c23e7f117fcdc05905..577c29e3a55afeb8a7c85e29883c2bf7c30bcff6 100644 (file)
@@ -22,7 +22,6 @@
 #include <algorithm>
 #include <fstream>
 #include <cstdlib>
-#include <sstream>
 #include <iomanip>
 #include <unistd.h>
 #include <boost/filesystem.hpp>
 #include "ratio.h"
 #include "cross.h"
 #include "cinema.h"
+#include "safe_stringstream.h"
 
 #include "i18n.h"
 
 using std::string;
-using std::stringstream;
 using std::multimap;
 using std::pair;
 using std::map;
@@ -162,7 +161,7 @@ Film::video_identifier () const
 {
        assert (container ());
 
-       stringstream s;
+       SafeStringStream s;
        s.imbue (std::locale::classic ());
        
        s << container()->id()
@@ -504,7 +503,7 @@ Film::file (boost::filesystem::path f) const
 string
 Film::isdcf_name (bool if_created_now) const
 {
-       stringstream d;
+       SafeStringStream d;
 
        string raw_name = name ();
 
@@ -827,7 +826,7 @@ Film::info_path (int f, Eyes e) const
        boost::filesystem::path p;
        p /= info_dir ();
 
-       stringstream s;
+       SafeStringStream s;
        s.width (8);
        s << setfill('0') << f;
 
@@ -854,7 +853,7 @@ Film::j2c_path (int f, Eyes e, bool t) const
        p /= "j2c";
        p /= video_identifier ();
 
-       stringstream s;
+       SafeStringStream s;
        s.width (8);
        s << setfill('0') << f;