From 2a85c79132c3a6448902644bdb248d81a6aef48c Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Mon, 13 Jul 2020 17:00:36 +0200 Subject: [PATCH] further cleanups for curves.* --- rtengine/curves.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 47b8572c7..3e876e987 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -1101,11 +1101,7 @@ void CurveFactory::complexLCurve(double br, double contr, const std::vectorisIdentity()) { - tcurve.reset(); - } - - if (tcurve) { + if (tcurve && !tcurve->isIdentity()) { utili = true; //if active // L values go up to 32767, last stop is for highlight overflow @@ -1121,7 +1117,7 @@ void CurveFactory::complexLCurve(double br, double contr, const std::vectorgetVal(outCurve[i]); - outCurve[i] = (32767.f * val); + outCurve[i] = 32767.f * val; } } else { @@ -1136,7 +1132,7 @@ void CurveFactory::complexLCurve(double br, double contr, const std::vector& curvePoints, LUTf & outCu tcurve.reset(new DiagonalCurve(curvePoints, CURVES_MIN_POLY_POINTS / skip)); } - if (tcurve && tcurve->isIdentity()) { - tcurve.reset(); - } - - if (tcurve) { + if (tcurve && !tcurve->isIdentity()) { if (!outCurve) { outCurve(65536, 0); } @@ -1172,7 +1164,6 @@ void CurveFactory::RGBCurve(const std::vector& curvePoints, LUTf & outCu } } - LocretigainCurverab::LocretigainCurverab() : sum(0.f) {}; void LocretigainCurverab::Reset()