Skip to content

Commit

Permalink
Fix when compiling against pre-3.1 version of Imath (AcademySoftwareF…
Browse files Browse the repository at this point in the history
…oundation#1145)

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
Signed-off-by: Julian Amann <julian.amann@tum.de>
  • Loading branch information
kdt3rd authored and Vertexwahn committed Sep 17, 2021
1 parent 50e58ce commit ccf8ed9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/OpenEXRCoreTest/compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ using namespace IMATH_NAMESPACE;
namespace IMF = OPENEXR_IMF_NAMESPACE;
using namespace IMF;

#if (IMATH_VERSION_MAJOR < 3) || (IMATH_VERSION_MAJOR == 3 && IMATH_VERSION_MINOR < 1)
inline float imath_half_to_float( uint16_t a )
{
half tmp;
tmp.setBits( a );
return static_cast<float>( tmp );
}
#endif

////////////////////////////////////////

inline int
Expand Down

0 comments on commit ccf8ed9

Please sign in to comment.