From 66f81bec4a642719bb74bfefe84059213c9a07bb Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 12 Mar 2020 14:40:49 +0100 Subject: Fix build with gcc 4.8.5 (fixes #2062) --- src/grids.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/grids.cpp') diff --git a/src/grids.cpp b/src/grids.cpp index b9da072c..7842d39b 100644 --- a/src/grids.cpp +++ b/src/grids.cpp @@ -1373,7 +1373,8 @@ VerticalShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) { if (IsTIFF(header_size, header)) { #ifdef TIFF_ENABLED - auto set = GTiffVGridShiftSet::open(ctx, std::move(fp), actualName); + auto set = std::unique_ptr( + GTiffVGridShiftSet::open(ctx, std::move(fp), actualName)); if (!set) pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID); return set; @@ -2351,7 +2352,8 @@ HorizontalShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) { } else if (IsTIFF(header_size, reinterpret_cast(header))) { #ifdef TIFF_ENABLED - auto set = GTiffHGridShiftSet::open(ctx, std::move(fp), actualName); + auto set = std::unique_ptr( + GTiffHGridShiftSet::open(ctx, std::move(fp), actualName)); if (!set) pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID); return set; @@ -2686,8 +2688,8 @@ GenericShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) { if (IsTIFF(header_size, header)) { #ifdef TIFF_ENABLED - auto set = - GTiffGenericGridShiftSet::open(ctx, std::move(fp), actualName); + auto set = std::unique_ptr( + GTiffGenericGridShiftSet::open(ctx, std::move(fp), actualName)); if (!set) pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID); return set; -- cgit v1.2.3 From 78eaa34a4816fd9a36e902adae4663f13bc39fab Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 14 Mar 2020 19:44:37 +0100 Subject: Fix build with libtiff master (libtiff > 4.1.0) --- src/grids.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/grids.cpp') diff --git a/src/grids.cpp b/src/grids.cpp index 7842d39b..c5fc6c74 100644 --- a/src/grids.cpp +++ b/src/grids.cpp @@ -309,8 +309,11 @@ constexpr uint16 TIFFTAG_GEOTRANSMATRIX = 34264; constexpr uint16 TIFFTAG_GEOKEYDIRECTORY = 34735; constexpr uint16 TIFFTAG_GEODOUBLEPARAMS = 34736; constexpr uint16 TIFFTAG_GEOASCIIPARAMS = 34737; +#ifndef TIFFTAG_GDAL_METADATA +// Starting with libtiff > 4.1.0, those symbolic names are #define in tiff.h constexpr uint16 TIFFTAG_GDAL_METADATA = 42112; constexpr uint16 TIFFTAG_GDAL_NODATA = 42113; +#endif // --------------------------------------------------------------------------- -- cgit v1.2.3