First round of cleanups for rtengine/dcp.*

- Sorted functions and methods
- Moved local functions to anonymous namespace
- Slightly modernized local functions
- Reworked `DCPStore` and fixed memory leak

Still coming:
- Rework `DCPProfile`
This commit is contained in:
Floessie
2016-06-04 22:43:09 +02:00
parent a520c93775
commit e0ca8ecdff
5 changed files with 946 additions and 907 deletions

View File

@@ -898,7 +898,7 @@ DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &
if (dcpProf == NULL) {
return NULL;
}
dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as);
return dcpProf;
}
@@ -4085,7 +4085,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed
in = embedded;
} else if (inProfile == "(cameraICC)") {
// DCPs have higher quality, so use them first
*dcpProf = dcpStore->getStdProfile(camName);
*dcpProf = DCPStore::getInstance()->getStdProfile(camName);
if (*dcpProf == NULL) {
in = iccStore->getStdProfile(camName);
@@ -4097,8 +4097,8 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed
normalName = inProfile.substr(5);
}
if (dcpStore->isValidDCPFileName(normalName)) {
*dcpProf = dcpStore->getProfile(normalName);
if (DCPStore::getInstance()->isValidDCPFileName(normalName)) {
*dcpProf = DCPStore::getInstance()->getProfile(normalName);
}
if (*dcpProf == NULL) {