aboutsummaryrefslogtreecommitdiff
path: root/development/mysql-workbench/gdal-2.2.0.patch
blob: 666184753ccec98d8170e588550a59f25ffd888a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From 97d26e5edfccead3fe3a10b732de51caa427eb60 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 16 May 2017 09:31:39 +0200
Subject: [PATCH 1/1] gdal: use CPLFree()

OGRFree() is deprecated as of gdal 2.2.0, so use CPLFree() instead.

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 backend/wbpublic/grt/spatial_handler.cpp                 | 4 ++--
 backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/backend/wbpublic/grt/spatial_handler.cpp b/backend/wbpublic/grt/spatial_handler.cpp
index 9b357603..ee36fa03 100644
--- a/backend/wbpublic/grt/spatial_handler.cpp
+++ b/backend/wbpublic/grt/spatial_handler.cpp
@@ -443,7 +443,7 @@ spatial::Importer::Importer() : _geometry(NULL), _interrupt(false), _srid(0) {
 
 spatial::Importer::~Importer() {
   if (_geometry != NULL)
-    OGRFree(_geometry);
+    CPLFree(_geometry);
 }
 
 OGRGeometry *spatial::Importer::steal_data() {
@@ -495,7 +495,7 @@ std::string spatial::Importer::as_wkt() {
       logError("Error exporting data to WKT (%i)\n", err);
     } else {
       std::string tmp(data);
-      OGRFree(data);
+      CPLFree(data);
       return tmp;
     }
   }
diff --git a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
index d2eb8495..7a7948bf 100644
--- a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
+++ b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
@@ -47,7 +47,7 @@ static grt::StringRef getGeoRepresentation(grt::StringRef data, bool outputAsJso
     OGRGeometryFactory::createFromWkb((unsigned char *)const_cast<char *>(&(*((*data).begin() + 4))), NULL, &geometry);
   if (ret_val != OGRERR_NONE) {
     if (geometry)
-      OGRFree(geometry);
+      CPLFree(geometry);
     throw std::exception();
   }
 
@@ -61,8 +61,8 @@ static grt::StringRef getGeoRepresentation(grt::StringRef data, bool outputAsJso
 
     if (err == OGRERR_NONE && data != NULL) {
       grt::StringRef tmp(data);
-      OGRFree(data);
-      OGRFree(geometry);
+      CPLFree(data);
+      CPLFree(geometry);
       return tmp;
     } else
       throw std::runtime_error("Conversion of OGR geometry data failed");
-- 
2.13.0