From 5f59156bb0377ff20a70b0a8d89d5e0665d9259f Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sun, 6 Dec 2015 02:30:18 +0100 Subject: [PATCH] Simplify querying the default monitor profile as suggested by Hombre57. --- rtengine/iccstore.h | 6 +++--- rtengine/improcfun.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 524db9cd2..ed9fbb424 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -89,8 +89,8 @@ public: static cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); // Main monitors standard profile name, from OS - const Glib::ustring& getDefaultMonitorProfile () const; void findDefaultMonitorProfile (); + cmsHPROFILE getDefaultMonitorProfile () const; cmsHPROFILE workingSpace (const Glib::ustring& name) const; cmsHPROFILE workingSpaceGamma (const Glib::ustring& name) const; @@ -129,9 +129,9 @@ inline ProfileContent::~ProfileContent () delete [] data; } -inline const Glib::ustring& ICCStore::getDefaultMonitorProfile () const +inline cmsHPROFILE ICCStore::getDefaultMonitorProfile () const { - return defaultMonitorProfile; + return getProfile (defaultMonitorProfile); } inline std::uint8_t ICCStore::getInputIntents (const Glib::ustring &name) const diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4306d4a6e..c9fa3c6c8 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -212,9 +212,9 @@ void ImProcFunctions::firstAnalysis (Imagefloat* original, const ProcParams* par #if defined(WIN32) - cmsHPROFILE monitor = iccStore->getProfile (settings->autoMonitorProfile - ? iccStore->getDefaultMonitorProfile () - : params->icm.monitorProfile); + cmsHPROFILE monitor = settings->autoMonitorProfile + ? iccStore->getDefaultMonitorProfile () + : iccStore->getProfile (params->icm.monitorProfile); #else