Skip to content

fmath.h: re-inline convert_type() half varieties#5130

Open
lgritz wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-fmath
Open

fmath.h: re-inline convert_type() half varieties#5130
lgritz wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-fmath

Conversation

@lgritz
Copy link
Copy Markdown
Collaborator

@lgritz lgritz commented Apr 4, 2026

A few years ago, in PR #3301, we made a big effort to remove Imath types as much as possible from the public APIs. Somehow, as part of that refactor, we ended up with just the half-varieties of fmath.h's convert_types() templates actually being implemented in fmath.cpp and only declared (by default) in fmath.h. I'm honestly not sure why I did that now, and the PR doesn't explain that particular point.

But that sets up a potential link incompatibility if OIIO used a different release of Imath than the use is using when calling that utility function.

So this PR makes it fully inline again, so the Imath version the downstream package uses just doesn't need to match what was found/used at the time that OIIO was built.

A few years ago, in PR 3301, we made a big effort to remove Imath
types as much as possible from the public APIs. Somehow, as part of
that refactor, we ended up with just the half-varieties of fmath.h's
convert_types() templates actually being implemented in fmath.cpp and
only declared (by default) in fmath.h. I'm honestly not sure why I did
that now, and the PR doesn't explain that particular point.

But that sets up a potential link incompatibility if OIIO used a
different release of Imath than the use is using when calling that
utility function.

So this PR makes it fully inline again, so the Imath version the
downstream package uses just doesn't need to match what was found/used
at the time that OIIO was build.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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