diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-07-30 01:54:37 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-07-30 01:54:37 +0000 |
| commit | 3dab417176ed1ba5b1301acbd9a1c08e8c546c49 (patch) | |
| tree | 83d01a0cc1356dd914b6690a5dbffd6e840e16af /src/color-profile.cpp | |
| parent | Update unit extraction regular expressions. (diff) | |
| parent | Remove unnecessary variable from the GMarkup-based unit parser (diff) | |
| download | inkscape-3dab417176ed1ba5b1301acbd9a1c08e8c546c49.tar.gz inkscape-3dab417176ed1ba5b1301acbd9a1c08e8c546c49.zip | |
Merge from trunk.
(bzr r12380.1.51)
Diffstat (limited to 'src/color-profile.cpp')
| -rw-r--r-- | src/color-profile.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 <glibmm/checksum.h> #include <gdkmm/color.h> #include <glib/gstdio.h> #include <fcntl.h> @@ -41,7 +42,6 @@ #include "preferences.h" #include "dom/uri.h" -#include "dom/util/digest.h" #ifdef WIN32 #include <icm.h> @@ -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<int>(perMonitorProfiles.size()) <= screen ) { std::vector<MemProfile> 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<unsigned char*>(buf), bufLen); + gsize len = bufLen; // len is an inout parameter + id = Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5, + reinterpret_cast<guchar*>(buf), len); // Note: if this is not a valid profile, item.hprof will be set to null. item.hprof = cmsOpenProfileFromMem(buf, bufLen); |
