FreeBSD Bugzilla – Attachment 254008 Details for
Bug 281859
graphics/openexr update to 3.3.0 for preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
2/4 fix ctl abusing C++ and change clamp() to std::clamp()
0002-graphics-ctl-fix-compatibility-with-OpenEXR-3.3.0.patch (text/plain), 1.50 KB, created by
Matthias Andree
on 2024-10-04 21:51:05 UTC
(
hide
)
Description:
2/4 fix ctl abusing C++ and change clamp() to std::clamp()
Filename:
MIME Type:
Creator:
Matthias Andree
Created:
2024-10-04 21:51:05 UTC
Size:
1.50 KB
patch
obsolete
>From f2b406ccc446f0195ee37432874298e6821b2615 Mon Sep 17 00:00:00 2001 >From: Matthias Andree <mandree@FreeBSD.org> >Date: Fri, 4 Oct 2024 10:50:13 +0200 >Subject: [PATCH 2/4] graphics/ctl: fix compatibility with OpenEXR 3.3.0 > >and fix complaint about clamp() call being ambiguous. Use std::clamp() instead. >--- > .../patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > create mode 100644 graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp > >diff --git a/graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp b/graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp >new file mode 100644 >index 000000000000..cd6d7ca72421 >--- /dev/null >+++ b/graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp >@@ -0,0 +1,19 @@ >+--- OpenEXR_CTL/exrdpx/exrToDpx.cpp.orig 2024-01-04 19:41:17 UTC >++++ OpenEXR_CTL/exrdpx/exrToDpx.cpp >+@@ -169,13 +169,13 @@ writePixels >+ const Rgba &pixel = pixels[y][x]; >+ >+ unsigned int r = >+- (unsigned int) (clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f); >++ (unsigned int) (std::clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f); >+ >+ unsigned int g = >+- (unsigned int) (clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f); >++ (unsigned int) (std::clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f); >+ >+ unsigned int b = >+- (unsigned int) (clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f); >++ (unsigned int) (std::clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f); >+ >+ unsigned int word = (r << 22) | (g << 12) | (b << 2); >+ >-- >2.46.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281859
:
254007
| 254008 |
254009
|
254010