Skip to content
Snippets Groups Projects
Commit ca2c51b6 authored by Luc Hermitte's avatar Luc Hermitte
Browse files

COMP: OTB-151/GeometriesProjectionFilter -- releasing OGRSpatialReference with old GDAL versions

parent f7db1b98
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,16 @@ namespace internal
{
struct Deleters
{
void operator()(OGRCoordinateTransformation *p){ OCTDestroyCoordinateTransformation(p); }
void operator()(OGRSpatialReference *p){ OGRSpatialReference::DestroySpatialReference(p); }
void operator()(OGRCoordinateTransformation *p) const { OCTDestroyCoordinateTransformation(p); }
void operator()(OGRSpatialReference *p) const
{
#if GDAL_VERSION_NUM >= 1700
OGRSpatialReference::DestroySpatialReference(p);
#else
#warning the following resource release may crash, please update your version of GDAL
delete p; // note there is no garanty
#endif
}
};
} // internal namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment