Skip to content

Commit

Permalink
Fix C4266 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Nov 7, 2024
1 parent 2bc635f commit cdfe8cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Auxiliary/DirectXTexEXR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@
#pragma warning(disable : 4244 4996)
#include <ImfRgbaFile.h>
#include <ImfIO.h>

// https://openexr.com/en/latest/PortingGuide.html
#include <OpenEXRConfig.h>
#pragma warning(pop)

#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + (100*OPENEXR_VERSION_MINOR) + OPENEXR_VERSION_PATCH)

#ifdef __clang__
#pragma clang diagnostic pop
#endif
Expand Down Expand Up @@ -148,6 +153,13 @@ namespace
SetLastError(0);
}

#if COMBINED_OPENEXR_VERSION >= 30300
int64_t read(void *buf, uint64_t sz, uint64_t offset) override
{
return Imf::IStream::read(buf, sz, offset);
}
#endif

private:
HANDLE m_hFile;
LONGLONG m_EOF;
Expand Down

0 comments on commit cdfe8cc

Please sign in to comment.