diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-07-25 19:06:28 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-07-25 19:06:28 +0000 |
| commit | 73e263588ca2ca99ea7cac8bbf274695dcd0bec6 (patch) | |
| tree | 75a0b4cbc426c1c21671ee784c0230b09ffd4fc4 /src/color-profile.cpp | |
| parent | Merged from trunk (r12419). (diff) | |
| parent | Remove unnecessary variable from the GMarkup-based unit parser (diff) | |
| download | inkscape-73e263588ca2ca99ea7cac8bbf274695dcd0bec6.tar.gz inkscape-73e263588ca2ca99ea7cac8bbf274695dcd0bec6.zip | |
Merge from trunk (r12439).
(bzr r11608.1.108)
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 57cf372a8..8e51ea6de 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> @@ -1249,8 +1249,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); @@ -1266,11 +1264,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); |
