Skip to content

Commit

Permalink
Fix when compiling against pre-3.1 version of Imath (#1145)
Browse files Browse the repository at this point in the history
Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd committed Sep 9, 2021
1 parent 50e58ce commit a4c24a8
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 a4c24a8

Please sign in to comment.