diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-22 10:04:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-03 17:01:32 +0100 |
| commit | 0ff1c0bda4c104dd37d15accd89c817f1ada4a72 (patch) | |
| tree | b7cade74272964bc3f0c3416cb960b88b6be1fca /src/KM_fileio.cpp | |
| parent | dfb6aa39a8000fc071dfa0680584dae173535c9a (diff) | |
Remove use of stringstream in FileWriter.
Diffstat (limited to 'src/KM_fileio.cpp')
| -rw-r--r-- | src/KM_fileio.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index d75af2c..9720c79 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -32,7 +32,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <asdcp/KM_fileio.h> #include <KM_log.h> #include <fcntl.h> -#include <sstream> #include <iomanip> #include <assert.h> @@ -780,13 +779,13 @@ Kumu::FileWriter::StopHashing() unsigned char digest[MD5_DIGEST_LENGTH]; MD5_Final (digest, &m_MD5Context); - std::stringstream s; + char hex[MD5_DIGEST_LENGTH * 2 + 1]; for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) { - s << std::hex << std::setfill('0') << std::setw(2) << ((int) digest[i]); + sprintf(hex + i * 2, "%02x", digest[i]); } - return s.str (); + return hex; } |
