From af2f46c8b731d4b23867a767355044ef2bd9206f Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 25 Apr 2015 20:43:31 +0000 Subject: [PATCH] #1065. std::map doesn't build on MacOS-X 10.6 (Snow Leopard). Thanks Max for letting me know about this. --- src/tiffimage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index ae95c5e5..6dc30d5b 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -412,12 +412,12 @@ namespace Exiv2 { return result; } - static const char* tagName(uint16_t tag,int nMaxLength) + static const char* tagName(uint16_t tag,size_t nMaxLength) { - const char* result = NULL; + const char* result = NULL; // build a static map of tags for fast search - static std::map tags; + static std::map tags; static bool init = true; static char buffer[80]; @@ -433,7 +433,7 @@ namespace Exiv2 { init = false; try { - result = tags[tag]; + result = tags[tag].c_str(); if ( nMaxLength > sizeof(buffer) ) nMaxLength = sizeof(buffer) - 2; strncpy(buffer,result,nMaxLength);