[graphics/krita] plugins/color/lcms2engine: Use value_or when testing the nits value in the ApplyRgbShaper transform.
Wolthera van Hövell <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit a017c08d8a2b8ea38da4b00f529f377578ea4d3d by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 16/07/2026 at 16:26.
Pushed by woltherav into branch 'master'.
Use value_or when testing the nits value in the ApplyRgbShaper transform.
M +2 -2 plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.h
https://invent.kde.org/graphics/krita/-/commit/a017c08d8a2b8ea38da4b00f529f377578ea4d3d
diff --git a/plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.h b/plugins/color/lcms2engine/LcmsRGBP2020PQColorSpaceTransformation.h
index 911d883b4d7..b486ad2d5dd 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);
}
};