Fix some errant stringstreams.
authorCarl Hetherington <cth@carlh.net>
Sat, 23 Aug 2014 22:36:06 +0000 (23:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 23 Aug 2014 22:36:06 +0000 (23:36 +0100)
src/lib/dcpomatic_time.h
src/lib/image.cc
src/lib/safe_stringstream.h
src/lib/subrip_content.cc
src/lib/subtitle_content.cc
src/lib/update.cc

index 4c7ea4ba52d524746ac9acb064ae6700d0d8ca35..55476d5b52ad6d5752344dd9a23b70d5f3770fe8 100644 (file)
@@ -26,6 +26,7 @@
 #include <iomanip>
 #include <stdint.h>
 #include "frame_rate_change.h"
+#include "safe_stringstream.h"
 
 class dcpomatic_round_up_test;
 
@@ -86,7 +87,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 << ":"
index 680c063f1a4d30ca9e364bbdbed615e7fafc9376..2eb2dbe28b013363e0852684761202ec550613d1 100644 (file)
@@ -41,7 +41,6 @@ using std::min;
 using std::cout;
 using std::cerr;
 using std::list;
-using std::stringstream;
 using boost::shared_ptr;
 using dcp::Size;
 
index e455de964b4acc5922b8cd01d79312072c43b16b..0ffcb62243b4635e23f1420ce86fcb06b751df95 100644 (file)
@@ -84,6 +84,11 @@ public:
                _stream.width (w);
        }
 
+       void fill (int f)
+       {
+               _stream.fill (f);
+       }
+       
        void precision (int p)
        {
                _stream.precision (p);
index c60b05d50a1ede29617d30ae2c8733593546b190..14cb50b86718eb3a25e0a3516a5cea9f823261e1 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "i18n.h"
 
-using std::stringstream;
 using std::string;
 using std::cout;
 using dcp::raw_convert;
index 3415ae613f5aee8175e122a9dea0d0517b791cf1..24b4694e8572067be466c549a6ee8db20ba0a0e9 100644 (file)
 #include "subtitle_content.h"
 #include "util.h"
 #include "exceptions.h"
+#include "safe_stringstream.h"
 
 #include "i18n.h"
 
 using std::string;
-using std::stringstream;
 using std::vector;
 using std::cout;
 using boost::shared_ptr;
@@ -160,7 +160,7 @@ SubtitleContent::set_subtitle_scale (double s)
 string
 SubtitleContent::identifier () const
 {
-       stringstream s;
+       SafeStringStream s;
        s << Content::identifier()
          << "_" << raw_convert<string> (subtitle_scale())
          << "_" << raw_convert<string> (subtitle_x_offset())
index 0146df48430deff9a410763e6a46bf7894b9af4d..c50022091fbe3ab6abb0169e86fa00e7444c4cb3 100644 (file)
@@ -32,7 +32,6 @@
 using std::cout;
 using std::min;
 using std::string;
-using std::stringstream;
 using dcp::raw_convert;
 
 /** Singleton instance */