diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-23 23:36:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-23 23:36:06 +0100 |
| commit | c2ad65492410eb40de5fea037a39c7a1a0693a43 (patch) | |
| tree | 6c6a9071cc42fda0524dde2aec7d17b8dc529f39 /src | |
| parent | 8c7a308c03e4b4196b4e2379a26d432b100ae2b1 (diff) | |
Fix some errant stringstreams.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcpomatic_time.h | 3 | ||||
| -rw-r--r-- | src/lib/image.cc | 1 | ||||
| -rw-r--r-- | src/lib/safe_stringstream.h | 5 | ||||
| -rw-r--r-- | src/lib/subrip_content.cc | 1 | ||||
| -rw-r--r-- | src/lib/subtitle_content.cc | 4 | ||||
| -rw-r--r-- | src/lib/update.cc | 1 |
6 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h index 4c7ea4ba5..55476d5b5 100644 --- a/src/lib/dcpomatic_time.h +++ b/src/lib/dcpomatic_time.h @@ -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 << ":" diff --git a/src/lib/image.cc b/src/lib/image.cc index 680c063f1..2eb2dbe28 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -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; diff --git a/src/lib/safe_stringstream.h b/src/lib/safe_stringstream.h index e455de964..0ffcb6224 100644 --- a/src/lib/safe_stringstream.h +++ b/src/lib/safe_stringstream.h @@ -84,6 +84,11 @@ public: _stream.width (w); } + void fill (int f) + { + _stream.fill (f); + } + void precision (int p) { _stream.precision (p); diff --git a/src/lib/subrip_content.cc b/src/lib/subrip_content.cc index c60b05d50..14cb50b86 100644 --- a/src/lib/subrip_content.cc +++ b/src/lib/subrip_content.cc @@ -25,7 +25,6 @@ #include "i18n.h" -using std::stringstream; using std::string; using std::cout; using dcp::raw_convert; diff --git a/src/lib/subtitle_content.cc b/src/lib/subtitle_content.cc index 3415ae613..24b4694e8 100644 --- a/src/lib/subtitle_content.cc +++ b/src/lib/subtitle_content.cc @@ -22,11 +22,11 @@ #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()) diff --git a/src/lib/update.cc b/src/lib/update.cc index 0146df484..c50022091 100644 --- a/src/lib/update.cc +++ b/src/lib/update.cc @@ -32,7 +32,6 @@ using std::cout; using std::min; using std::string; -using std::stringstream; using dcp::raw_convert; /** Singleton instance */ |
