Skip to content

Commit

Permalink
fix: add const cast for Linux build script with old GDAL version
Browse files Browse the repository at this point in the history
  • Loading branch information
LandscapeLab Office committed Aug 21, 2024
1 parent 970cd45 commit 08f0b35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vector-extractor/NativeLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ NativeLayer::NativeLayer(OGRLayer *layer) : layer(layer) {
layer->GetGeomType());

for (const OGRFieldDefn *defn : layer->GetLayerDefn()->GetFields()) {
ram_layer->CreateField(defn);
// FIXME: the const_cast can be removed once all build scripts refer to GDAL 3.9, where the CreateField parameter
// was changed to const OGRFieldDefn* - see https://github.com/OSGeo/gdal/blob/v3.9.0/NEWS.md#core-1
ram_layer->CreateField(const_cast<OGRFieldDefn*>(defn));
}

disk_feature_count = layer->GetFeatureCount();
Expand Down

0 comments on commit 08f0b35

Please sign in to comment.