Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix qt5 build.

Wolthera van Hövell tot Westerflierdd2d2236ab43
diff --git a/libs/pigment/KoGamutMappingUtils.cpp b/libs/pigment/KoGamutMappingUtils.cpp
index b6d209fa50..cc90d8ea01 100644
--- a/libs/pigment/KoGamutMappingUtils.cpp
+++ b/libs/pigment/KoGamutMappingUtils.cpp
@@ -223,9 +223,9 @@ KoGamutMappingUtils::PiecewiseFilmicCurve KoGamutMappingUtils::PiecewiseFilmicCu
{
const float uiGamma = 2.2f;
- const float normalizedToeLength = powf(qBound(0.0, toeLength, 1.0), uiGamma);
- const float normalizedToeStrength = qBound(0.0, toeStrength, 1.0);
- const float normalizedShoulderAngle = qBound(0.0, shoulderAngle, 1.0);
+ const float normalizedToeLength = powf(qBound(0.0f, toeLength, 1.0f), uiGamma);
+ const float normalizedToeStrength = qBound(0.0f, toeStrength, 1.0f);
+ const float normalizedShoulderAngle = qBound(0.0f, shoulderAngle, 1.0f);
const float x0 = normalizedToeLength * .5f;
const float y0 = (1.0f - normalizedToeStrength) * x0;
diff --git a/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp b/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp
index 96ad7154cb..bff98f0eb9 100644
--- a/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp
+++ b/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp
@@ -65,8 +65,6 @@ struct xyzToOkLabModel {
const QVector4D OkLab = lmsToOkLab * lmsPrime;
QVector<qreal> lch(3);
LabToLCH(OkLab.x(), OkLab.y()+0.5, OkLab.z()+0.5, &lch[0], &lch[1], &lch[2]);
- lch[0] = qMin(lch[0], 1.0);
- lch[1] = qMin(lch[1], 1.0);
return lch;
}
@@ -82,9 +80,9 @@ struct xyzToOkLabModel {
powf(lmsPrime.y(), 3.0),
powf(lmsPrime.z(), 3.0), 0.0);
const QVector4D xyz = xyz50To65_inv * (XYZtoOkLABLMS_inv * lms);
- channels[0] = qMax(0.0, xyz.x());
- channels[1] = qMax(0.0, xyz.y());
- channels[2] = qMax(0.0, xyz.z());
+ channels[0] = xyz.x();
+ channels[1] = xyz.y();
+ channels[2] = xyz.z();
//qDebug() << "lch" << lch << "col" << color << "lmsprime" << lmsPrime << "lms" << lms << "xyz" << channels;
return channels;