diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index 8e99d6d1..2f2859e9 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -1512,15 +1512,16 @@ namespace Exiv2 { //! Function to create and initialize a new binary array entry template - TiffComponent::AutoPtr newTiffBinaryArray(uint16_t tag, uint16_t group) + TiffComponent::AutoPtr newTiffBinaryArray0(uint16_t tag, uint16_t group) { + // *& acrobatics is a workaround for a MSVC 7.1 bug return TiffComponent::AutoPtr( - new TiffBinaryArray(tag, group, arrayCfg, arrayDef, N)); + new TiffBinaryArray(tag, group, arrayCfg, *(&arrayDef), N)); } //! Function to create and initialize a new simple binary array entry template - TiffComponent::AutoPtr newTiffBinaryArray(uint16_t tag, uint16_t group) + TiffComponent::AutoPtr newTiffBinaryArray1(uint16_t tag, uint16_t group) { return TiffComponent::AutoPtr( new TiffBinaryArray(tag, group, arrayCfg, 0, 0)); diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index 7866aab5..abb23479 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -271,8 +271,8 @@ namespace Exiv2 { } // namespace Exiv2 // Shortcuts for the newTiffBinaryArray templates. -#define EXV_BINARY_ARRAY(arrayCfg, arrayDef) (newTiffBinaryArray<&arrayCfg, EXV_COUNTOF(arrayDef), arrayDef>) -#define EXV_SIMPLE_BINARY_ARRAY(arrayCfg) (newTiffBinaryArray<&arrayCfg>) +#define EXV_BINARY_ARRAY(arrayCfg, arrayDef) (newTiffBinaryArray0<&arrayCfg, EXV_COUNTOF(arrayDef), arrayDef>) +#define EXV_SIMPLE_BINARY_ARRAY(arrayCfg) (newTiffBinaryArray1<&arrayCfg>) #define EXV_COMPLEX_BINARY_ARRAY(arraySet, cfgSelFct) (newTiffBinaryArray2) namespace Exiv2 {