diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-19 21:01:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-19 21:01:28 +0100 |
| commit | 9a2b45caa81d8fb056802dfe3c25f214e808ffdf (patch) | |
| tree | 1cead4781d2a8546c3ba8b8f936d18bf8e8a6403 /src/lib/update.cc | |
| parent | aa3565457977dabb658f41c71e14151473b91f07 (diff) | |
Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X.
Diffstat (limited to 'src/lib/update.cc')
| -rw-r--r-- | src/lib/update.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/update.cc b/src/lib/update.cc index af3e46f0e..7bec061e9 100644 --- a/src/lib/update.cc +++ b/src/lib/update.cc @@ -18,7 +18,6 @@ */ #include <string> -#include <sstream> #include <boost/algorithm/string.hpp> #include <curl/curl.h> #include <libcxml/cxml.h> @@ -26,13 +25,13 @@ #include "update.h" #include "version.h" #include "ui_signaller.h" +#include "safe_stringstream.h" #define BUFFER_SIZE 1024 using std::cout; using std::min; using std::string; -using std::stringstream; using libdcp::raw_convert; UpdateChecker* UpdateChecker::_instance = 0; @@ -103,10 +102,9 @@ UpdateChecker::thread () } _buffer[_offset] = '\0'; - stringstream s; - s << _buffer; + string s (_buffer); cxml::Document doc ("Update"); - doc.read_stream (s); + doc.read_string (s); { boost::mutex::scoped_lock lm (_data_mutex); |
