From 5aeb42cd7f874dbd127df4ab7ccc8ffcf25f07ab Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Tue, 23 Jul 2013 13:18:56 +0200 Subject: Remove the Digest class. Replace its only use with a glibmm call. (bzr r12429) --- src/color-profile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/color-profile.cpp') diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 5fb84d8ac..918fc79d4 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -4,6 +4,7 @@ #define noDEBUG_LCMS +#include #include #include #include @@ -41,7 +42,6 @@ #include "preferences.h" #include "dom/uri.h" -#include "dom/util/digest.h" #ifdef WIN32 #include @@ -1285,8 +1285,6 @@ Glib::ustring Inkscape::CMSSystem::getDisplayId( int screen, int monitor ) Glib::ustring Inkscape::CMSSystem::setDisplayPer( gpointer buf, guint bufLen, int screen, int monitor ) { - Glib::ustring id; - while ( static_cast(perMonitorProfiles.size()) <= screen ) { std::vector tmp; perMonitorProfiles.push_back(tmp); @@ -1302,11 +1300,13 @@ Glib::ustring Inkscape::CMSSystem::setDisplayPer( gpointer buf, guint bufLen, in cmsCloseProfile( item.hprof ); item.hprof = 0; } - id.clear(); + + Glib::ustring id; if ( buf && bufLen ) { - id = Digest::hashHex(Digest::HASH_MD5, - reinterpret_cast(buf), bufLen); + gsize len = bufLen; // len is an inout parameter + id = Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5, + reinterpret_cast(buf), len); // Note: if this is not a valid profile, item.hprof will be set to null. item.hprof = cmsOpenProfileFromMem(buf, bufLen); -- cgit v1.2.3