From 6b67854c3e31c6bfaa94384f0482f2cbe1fc7b49 Mon Sep 17 00:00:00 2001 From: Antoine Regimbeau <antoine.regimbeau@c-s.fr> Date: Thu, 21 Mar 2019 17:06:49 +0100 Subject: [PATCH] COMP: fix missing const in template --- .../GdalAdapters/include/otbOGRFieldWrapper.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.hxx b/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.hxx index 817f53bb70..2f1fb05961 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.hxx +++ b/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.hxx @@ -232,7 +232,11 @@ template */ template < typename T +#if GDAL_VERSION_NUM >= 2030000 + , void ( OGRFeature::*ptr_to_function )(int, int, const T*) +#else , void ( OGRFeature::*ptr_to_function )(int, int, T*) // not const-correct +#endif , typename ActualParamType = std::vector<T> , bool Is_contiguous = boost::is_contiguous<ActualParamType>::value > class TagDispatchMemberContainerSetterPtr; @@ -241,7 +245,11 @@ template */ template < typename T +#if GDAL_VERSION_NUM >= 2030000 + , void ( OGRFeature::*ptr_to_function )(int, int, const T*) +#else , void ( OGRFeature::*ptr_to_function )(int, int, T*) // not const-correct +#endif , typename ActualParamType > class TagDispatchMemberContainerSetterPtr<T, ptr_to_function, ActualParamType, true> { @@ -257,7 +265,11 @@ template */ template < typename T +#if GDAL_VERSION_NUM >= 2030000 + , void ( OGRFeature::*ptr_to_function )(int, int, const T*) +#else , void ( OGRFeature::*ptr_to_function )(int, int, T*) // not const-correct +#endif , typename ActualParamType > class TagDispatchMemberContainerSetterPtr<T, ptr_to_function, ActualParamType, false> { -- GitLab