Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use std::abs in chromaticity sanity tests (fixes #1177) #1178

Conversation

peterhillman
Copy link
Contributor

abs() on older compilers resolves to integer only method. Explicitly use std::abs() on each occurrence to force use of floating-point overload

Signed-off-by: Peter Hillman peterh@wetafx.co.nz

Copy link
Contributor

@kdt3rd kdt3rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cary-ilm
Copy link
Member

LGTM, too. Other files that use abs() have "using namespace std", although EnvmapImage.cpp and ImfFramesPerSecond.cpp seem to be picking up abs() from ImathFun.h, which should probably be deprecated in favor of std::abs().

@peterhillman peterhillman merged commit 06575aa into AcademySoftwareFoundation:master Oct 12, 2021
@peterhillman peterhillman deleted the chromaticities_div_fix branch October 12, 2021 20:47
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Oct 14, 2021
cary-ilm pushed a commit that referenced this pull request Oct 24, 2021
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants