diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-22 10:04:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-11-23 23:54:16 +0100 |
| commit | c4eff13af3b61c4ade43c2d85b44c559351bcbd6 (patch) | |
| tree | 0311d3b7a9ce3e3de23a643d67d1f880fde89d05 /src | |
| parent | b5dc29b2bf68213eac35048e21e9c26f7a221db7 (diff) | |
Remove use of stringstream in FileWriter.
Diffstat (limited to 'src')
| -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 e2bb829..3b6c412 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 <asdcp/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; } |
