summaryrefslogtreecommitdiff
path: root/sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch
blob: 29edb8518b9d047377c1f32626d545b2d5b81a4b (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
From https://github.com/PDAL/PDAL/commit/516e33ad7f40e54affd5754617fbe26d70ef2dd4
From: Jorge Gustavo Rocha <jgr@geomaster.pt>
Date: Thu, 20 Apr 2023 13:11:46 +0100
Subject: [PATCH] prevent invalid conversion from const compile error (#4030)
squashed with
From https://github.com/dg0yt/PDAL/commit/49eb31840dc1c07d6ff235ea292c7c0703f8a884
From: Kai Pastor <dg0yt@darc.de>
Date: Fri, 12 May 2023 07:44:59 +0200
Subject: [PATCH] Don't use const_cast

Amends #4030.
---
 pdal/Geometry.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pdal/Geometry.cpp b/pdal/Geometry.cpp
index 10d185dbe4..8b010d3378 100644
--- a/pdal/Geometry.cpp
+++ b/pdal/Geometry.cpp
@@ -153,7 +153,7 @@ Geometry& Geometry::operator=(const Geometry& input)
 
 bool Geometry::srsValid() const
 {
-    OGRSpatialReference *srs = m_geom->getSpatialReference();
+    const OGRSpatialReference *srs = m_geom->getSpatialReference();
     return srs && srs->GetRoot();
 }
 
@@ -172,7 +172,7 @@ Utils::StatusWithReason Geometry::transform(SpatialReference out)
         return StatusWithReason(-2,
             "Geometry::transform() failed.  NULL target SRS.");
 
-    OGRSpatialReference *inSrs = m_geom->getSpatialReference();
+    const OGRSpatialReference *inSrs = m_geom->getSpatialReference();
     SrsTransform transform(*inSrs, OGRSpatialReference(out.getWKT().data()));
     if (m_geom->transform(transform.get()) != OGRERR_NONE)
         return StatusWithReason(-1, "Geometry::transform() failed.");