diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-11-27 18:42:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-11-27 18:42:07 +0000 |
| commit | 18c3b488dff343a9b287d8d0fd68143b792ec75e (patch) | |
| tree | 8beb9ca8400a68a8406b52737f90cafd4eafbc14 /src | |
| parent | 2a02b09b9df160d6c83874d0ac2ae5f16bd50bb5 (diff) | |
Fix some stringstreams that had crept in.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/emailer.cc | 3 | ||||
| -rw-r--r-- | src/lib/json_server.cc | 5 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/emailer.cc b/src/lib/emailer.cc index 50ced3340..b605d067d 100644 --- a/src/lib/emailer.cc +++ b/src/lib/emailer.cc @@ -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" diff --git a/src/lib/json_server.cc b/src/lib/json_server.cc index c7a3ca144..38d5501c5 100644 --- a/src/lib/json_server.cc +++ b/src/lib/json_server.cc @@ -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" diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 78b320034..7321fc7c5 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -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 ( |
