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++
Use value_or when testing the nits value in the ApplyRgbShaper transform.
Wolthera van Hövell tot Westerfliera017c08d8a2b
diff --git a/plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.h b/plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.hindex 911d883b4d..b486ad2d5d 100644--- a/plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.h+++ b/plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.h@@ -59,7 +59,7 @@ struct RemoveSmpte2048Policy {static ALWAYS_INLINE double getRefWhite(const KoColorSpace *src, const KoColorSpace *target) {Q_UNUSED(target)if (!src || !src->profile()) return 203.0;- return src->profile()->hdrReferenceWhite()? *src->profile()->hdrReferenceWhite(): 203.0;+ return src->profile()->hdrReferenceWhite().value_or(203.0);}};@@ -77,7 +77,7 @@ struct ApplySmpte2048Policy {static ALWAYS_INLINE double getRefWhite(const KoColorSpace *src, const KoColorSpace *target) {Q_UNUSED(src)if (!target || !target->profile()) return 203.0;- return target->profile()->hdrReferenceWhite()? *target->profile()->hdrReferenceWhite(): 203.0;+ return target->profile()->hdrReferenceWhite().value_or(203.0);}};