Fix some stringstreams that had crept in.
authorCarl Hetherington <cth@carlh.net>
Fri, 27 Nov 2015 18:42:07 +0000 (18:42 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 27 Nov 2015 18:42:07 +0000 (18:42 +0000)
src/lib/emailer.cc
src/lib/json_server.cc
src/lib/video_content.cc
test/video_content_scale_test.cc

index 50ced3340e9d9879377e67f522fc4ce184129783..b605d067d9449cace592a40d62027884e2ed100d 100644 (file)
@@ -30,7 +30,6 @@
 #include "i18n.h"
 
 using std::string;
-using std::stringstream;
 using std::min;
 using std::list;
 using std::cout;
@@ -102,7 +101,7 @@ Emailer::send ()
        boost::posix_time::time_duration offset = local_now - utc_now;
        sprintf (date_buffer + strlen(date_buffer), "%s%02d%02d", (offset.hours() >= 0 ? "+" : "-"), abs (offset.hours()), offset.minutes());
 
-       stringstream email;
+       SafeStringStream email;
 
        email << "Date: " << date_buffer << "\r\n"
              << "To: " << address_list (_to) << "\r\n"
index c7a3ca144e4c5974c7e632ba970955c6eb9f103c..38d5501c5a29065dfdde9538bde3565cb8bd0d5a 100644 (file)
@@ -29,7 +29,6 @@
 #include <iostream>
 
 using std::string;
-using std::stringstream;
 using std::cout;
 using std::map;
 using std::list;
@@ -151,7 +150,7 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket)
                action = r["action"];
        }
 
-       stringstream json;
+       SafeStringStream json;
        if (action == "status") {
 
                list<shared_ptr<Job> > jobs = JobManager::instance()->get ();
@@ -187,7 +186,7 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket)
                }
        }
 
-       stringstream reply;
+       SafeStringStream reply;
        reply << "HTTP/1.1 200 OK\r\n"
              << "Content-Length: " << json.str().length() << "\r\n"
              << "Content-Type: application/json\r\n"
index 78b3200341e84cc02c0867792b522fec5fd15a8f..7321fc7c584bbf8c9dfa42b39f81dfce76b1d752 100644 (file)
@@ -55,7 +55,6 @@ using std::cout;
 using std::vector;
 using std::min;
 using std::max;
-using std::stringstream;
 using std::fixed;
 using std::setprecision;
 using std::list;
@@ -512,7 +511,7 @@ string
 VideoContent::processing_description () const
 {
        /* stringstream is OK here as this string is just for presentation to the user */
-       stringstream d;
+       SafeStringStream d;
 
        if (video_size().width && video_size().height) {
                d << String::compose (
index 8c3bd431acd20536c3fc3fa3b94789ca3a8923cd..1acac8a376c5d078887b3cfdb35bdfce45dad979 100644 (file)
@@ -24,7 +24,6 @@
 using std::list;
 using std::string;
 using std::cerr;
-using std::stringstream;
 using boost::shared_ptr;
 using boost::optional;
 
@@ -33,7 +32,7 @@ void
 test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop crop, Ratio const * ratio, bool scale, dcp::Size correct)
 {
        shared_ptr<Film> film;
-       stringstream s;
+       SafeStringStream s;
        s << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                "<Content>"
                "<Type>FFmpeg</Type>"