diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-10 16:38:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-12 09:13:51 +0100 |
| commit | b1dc9c3a2f7e55c9afc5bf2d5b465371b048e14f (patch) | |
| tree | 9968238c6c0511f044e6fcdb4abcc08b5eb28f27 /src/lib/content.cc | |
| parent | 4a0ae92e28d7d1f0dd648d1b620efc324fdef161 (diff) | |
Remove all use of stringstream in an attempt to fix
the suspected thread-unsafe crash bugs on OS X.
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index a56573ed2..9c7e79040 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -30,7 +30,6 @@ #include "job.h" #include "compose.hpp" #include "raw_convert.h" -#include <locked_sstream.h> #include <libcxml/cxml.h> #include <libxml++/libxml++.h> #include <boost/thread/mutex.hpp> @@ -254,14 +253,12 @@ Content::length_after_trim () const string Content::identifier () const { - locked_stringstream s; - - s << Content::digest() - << "_" << position().get() - << "_" << trim_start().get() - << "_" << trim_end().get(); - - return s.str (); + char buffer[256]; + snprintf ( + buffer, sizeof(buffer), "%s_%" PRId64 "_%" PRId64 "_%" PRId64, + Content::digest().c_str(), position().get(), trim_start().get(), trim_end().get() + ); + return buffer; } bool |
