diff --git a/OpenEXR/IlmImf/ImfMisc.cpp b/OpenEXR/IlmImf/ImfMisc.cpp index 37a628189d..767040e3cf 100644 --- a/OpenEXR/IlmImf/ImfMisc.cpp +++ b/OpenEXR/IlmImf/ImfMisc.cpp @@ -132,26 +132,6 @@ bytesPerLineTable (const Header &header, return maxBytesPerLine; } - -const int& -sampleCount(const char* base, int xStride, int yStride, int x, int y) -{ - const char* ptr = base + y * yStride + x * xStride; - int* intPtr = (int*) ptr; - - return *intPtr; -} - -int& -sampleCount(char* base, int xStride, int yStride, int x, int y) -{ - char* ptr = base + y * yStride + x * xStride; - int* intPtr = (int*) ptr; - - return *intPtr; -} - - size_t bytesPerDeepLineTable (const Header &header, int minY, int maxY, diff --git a/OpenEXR/IlmImf/ImfMisc.h b/OpenEXR/IlmImf/ImfMisc.h index cc697e24fc..c0d90eaa1b 100644 --- a/OpenEXR/IlmImf/ImfMisc.h +++ b/OpenEXR/IlmImf/ImfMisc.h @@ -95,14 +95,26 @@ size_t bytesPerLineTable (const Header &header, // pointer, xStride and yStride. // -IMF_EXPORT +inline int& -sampleCount(char* base, int xStride, int yStride, int x, int y); +sampleCount(char* base, int xStride, int yStride, int x, int y) +{ + char* ptr = base + y * yStride + x * xStride; + int* intPtr = (int*) ptr; + return *intPtr; +} -IMF_EXPORT + +inline const int& -sampleCount(const char* base, int xStride, int yStride, int x, int y); +sampleCount(const char* base, int xStride, int yStride, int x, int y) +{ + const char* ptr = base + y * yStride + x * xStride; + int* intPtr = (int*) ptr; + + return *intPtr; +} // // Build a table that lists, for each scanline in a DEEP file's