Skip to content

Comments

fix: address fmath.h warning with ispow2#5033

Merged
lgritz merged 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-fmath
Feb 24, 2026
Merged

fix: address fmath.h warning with ispow2#5033
lgritz merged 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-fmath

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Feb 7, 2026

I was seeing warnings with instantiation of the ispow2 function template for unsigned type, where the x >= 0 clause is meaningless. Use a constexpr if to eliminate that pointless test for unsigned types.

I was seeing warnings with instantiation of the ispow2 function
template for unsigned type, where the `x >= 0` clause is
meaningless. Use a constexpr if to eliminate that pointless test for
unsigned types.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz
Copy link
Collaborator Author

lgritz commented Feb 22, 2026

Been op for a couple weeks. Last chance. Seem ok?

@lgritz lgritz merged commit 0ceac85 into AcademySoftwareFoundation:main Feb 24, 2026
29 checks passed
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Feb 24, 2026
)

I was seeing warnings with instantiation of the ispow2 function template
for unsigned type, where the `x >= 0` clause is meaningless. Use a
constexpr if to eliminate that pointless test for unsigned types.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
@lgritz lgritz deleted the lg-fmath branch February 24, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant