Skip to content

Commit

Permalink
OGRLayer: Have CreateField take const OGRField* argument
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Nov 17, 2023
1 parent 61b83a3 commit b06a9a3
Show file tree
Hide file tree
Showing 99 changed files with 152 additions and 120 deletions.
4 changes: 2 additions & 2 deletions frmts/fits/fitsdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class FITSLayer final : public OGRLayer,
int TestCapability(const char *) override;
OGRFeature *GetFeature(GIntBig) override;
GIntBig GetFeatureCount(int bForce) override;
OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK) override;
OGRErr CreateField(const OGRFieldDefn *poField, int bApproxOK) override;
OGRErr ICreateFeature(OGRFeature *poFeature) override;
OGRErr ISetFeature(OGRFeature *poFeature) override;
OGRErr DeleteFeature(GIntBig nFID) override;
Expand Down Expand Up @@ -1261,7 +1261,7 @@ void FITSLayer::RunDeferredFieldCreation(const OGRFeature *poFeature)
/* CreateField() */
/************************************************************************/

OGRErr FITSLayer::CreateField(OGRFieldDefn *poField, int /* bApproxOK */)
OGRErr FITSLayer::CreateField(const OGRFieldDefn *poField, int /* bApproxOK */)
{
if (!TestCapability(OLCCreateField))
return OGRERR_FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion frmts/netcdf/netcdfdataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ class netCDFLayer final : public OGRLayer
virtual OGRFeatureDefn *GetLayerDefn() override;

virtual OGRErr ICreateFeature(OGRFeature *poFeature) override;
virtual OGRErr CreateField(OGRFieldDefn *poFieldDefn,
virtual OGRErr CreateField(const OGRFieldDefn *poFieldDefn,
int bApproxOK) override;
};

Expand Down
3 changes: 2 additions & 1 deletion frmts/netcdf/netcdflayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2433,7 +2433,8 @@ bool netCDFLayer::AddField(int nVarID)
/* CreateField() */
/************************************************************************/

OGRErr netCDFLayer::CreateField(OGRFieldDefn *poFieldDefn, int /* bApproxOK */)
OGRErr netCDFLayer::CreateField(const OGRFieldDefn *poFieldDefn,
int /* bApproxOK */)
{
int nSecDimId = -1;
int nVarID = -1;
Expand Down
4 changes: 2 additions & 2 deletions frmts/null/nulldataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class GDALNullLayer final : public OGRLayer
return OGRERR_NONE;
}

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
};

Expand Down Expand Up @@ -371,7 +371,7 @@ int GDALNullLayer::TestCapability(const char *pszCap)
/* CreateField() */
/************************************************************************/

OGRErr GDALNullLayer::CreateField(OGRFieldDefn *poField, int)
OGRErr GDALNullLayer::CreateField(const OGRFieldDefn *poField, int)
{
poFeatureDefn->AddFieldDefn(poField);
return OGRERR_NONE;
Expand Down
3 changes: 2 additions & 1 deletion frmts/pcidsk/ogrpcidsklayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,8 @@ OGRErr OGRPCIDSKLayer::ISetFeature(OGRFeature *poFeature)
/* CreateField() */
/************************************************************************/

OGRErr OGRPCIDSKLayer::CreateField(OGRFieldDefn *poFieldDefn, int bApproxOK)
OGRErr OGRPCIDSKLayer::CreateField(const OGRFieldDefn *poFieldDefn,
int bApproxOK)

{
try
Expand Down
2 changes: 1 addition & 1 deletion frmts/pcidsk/pcidskdataset2.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class OGRPCIDSKLayer final : public OGRLayer,

OGRErr DeleteFeature(GIntBig nFID) override;
virtual OGRErr ICreateFeature(OGRFeature *poFeature) override;
virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;

GIntBig GetFeatureCount(int) override;
Expand Down
4 changes: 2 additions & 2 deletions frmts/pds/pds4dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class PDS4FixedWidthTable CPL_NON_FINAL : public PDS4TableBaseLayer
int TestCapability(const char *) override;
OGRErr ISetFeature(OGRFeature *poFeature) override;
OGRErr ICreateFeature(OGRFeature *poFeature) override;
OGRErr CreateField(OGRFieldDefn *poFieldIn, int) override;
OGRErr CreateField(const OGRFieldDefn *poFieldIn, int) override;

bool ReadTableDef(const CPLXMLNode *psTable);

Expand Down Expand Up @@ -272,7 +272,7 @@ class PDS4DelimitedTable CPL_NON_FINAL : public PDS4TableBaseLayer
OGRFeature *GetNextFeature() override;
int TestCapability(const char *) override;
OGRErr ICreateFeature(OGRFeature *poFeature) override;
OGRErr CreateField(OGRFieldDefn *poFieldIn, int) override;
OGRErr CreateField(const OGRFieldDefn *poFieldIn, int) override;

bool ReadTableDef(const CPLXMLNode *psTable);

Expand Down
4 changes: 2 additions & 2 deletions frmts/pds/pds4vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ void PDS4FixedWidthTable::RefreshFileAreaObservational(CPLXMLNode *psFAO)
/* CreateField() */
/************************************************************************/

OGRErr PDS4FixedWidthTable::CreateField(OGRFieldDefn *poFieldIn, int)
OGRErr PDS4FixedWidthTable::CreateField(const OGRFieldDefn *poFieldIn, int)

{
if (m_poDS->GetAccess() != GA_Update)
Expand Down Expand Up @@ -2104,7 +2104,7 @@ OGRErr PDS4DelimitedTable::ICreateFeature(OGRFeature *poFeature)
/* CreateField() */
/************************************************************************/

OGRErr PDS4DelimitedTable::CreateField(OGRFieldDefn *poFieldIn, int)
OGRErr PDS4DelimitedTable::CreateField(const OGRFieldDefn *poFieldIn, int)

{
if (m_poDS->GetAccess() != GA_Update)
Expand Down
4 changes: 2 additions & 2 deletions gnm/gnm.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class GNMGenericLayer : public OGRLayer

virtual int TestCapability(const char *) override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
virtual OGRErr DeleteField(int iField) override;
virtual OGRErr ReorderFields(int *panMap) override;
Expand Down Expand Up @@ -721,7 +721,7 @@ class OGRGNMWrappedResultLayer : public OGRLayer
virtual OGRFeatureDefn *GetLayerDefn() override;
virtual GIntBig GetFeatureCount(int bForce = TRUE) override;
virtual int TestCapability(const char *pszCap) override;
virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poField,
int bApproxOK = TRUE) override;
Expand Down
2 changes: 1 addition & 1 deletion gnm/gnmlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ int GNMGenericLayer::TestCapability(const char *pszCapability)
return m_poLayer->TestCapability(pszCapability);
}

OGRErr GNMGenericLayer::CreateField(OGRFieldDefn *poField, int bApproxOK)
OGRErr GNMGenericLayer::CreateField(const OGRFieldDefn *poField, int bApproxOK)
{
return m_poLayer->CreateField(poField, bApproxOK);
}
Expand Down
2 changes: 1 addition & 1 deletion gnm/gnmresultlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int OGRGNMWrappedResultLayer::TestCapability(const char *pszCap)
return poLayer->TestCapability(pszCap);
}

OGRErr OGRGNMWrappedResultLayer::CreateField(OGRFieldDefn *poField,
OGRErr OGRGNMWrappedResultLayer::CreateField(const OGRFieldDefn *poField,
int bApproxOK)
{
return poLayer->CreateField(poField, bApproxOK);
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/amigocloud/ogr_amigocloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class OGRAmigoCloudTableLayer final : public OGRAmigoCloudLayer

virtual int TestCapability(const char *) override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;

virtual OGRFeature *GetNextRawFeature() override;
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/amigocloud/ogramigocloudtablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ void OGRAmigoCloudTableLayer::FlushDeferredInsert()
/* CreateField() */
/************************************************************************/

OGRErr OGRAmigoCloudTableLayer::CreateField(OGRFieldDefn *poFieldIn,
OGRErr OGRAmigoCloudTableLayer::CreateField(const OGRFieldDefn *poFieldIn,
CPL_UNUSED int bApproxOK)
{
GetLayerDefn();
Expand Down
3 changes: 2 additions & 1 deletion ogr/ogrsf_frmts/arrow_common/ogr_arrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ class OGRArrowWriterLayer CPL_NON_FINAL : public OGRLayer
return nullptr;
}
int TestCapability(const char *pszCap) override;
OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK = TRUE) override;
OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
OGRErr CreateGeomField(OGRGeomFieldDefn *poField,
int bApproxOK = TRUE) override;
GIntBig GetFeatureCount(int bForce) override;
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/arrow_common/ograrrowwriterlayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ OGRArrowWriterLayer::GetFieldDomain(const std::string &name) const
/* CreateField() */
/************************************************************************/

inline OGRErr OGRArrowWriterLayer::CreateField(OGRFieldDefn *poField,
inline OGRErr OGRArrowWriterLayer::CreateField(const OGRFieldDefn *poField,
int /* bApproxOK */)
{
if (m_poSchema)
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/carto/ogr_carto.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class OGRCARTOTableLayer final : public OGRCARTOLayer
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poGeomFieldIn,
int bApproxOK = TRUE) override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;

virtual OGRErr DeleteField(int iField) override;
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/carto/ogrcartotablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ OGRErr OGRCARTOTableLayer::CreateGeomField(OGRGeomFieldDefn *poGeomFieldIn,
/* CreateField() */
/************************************************************************/

OGRErr OGRCARTOTableLayer::CreateField(OGRFieldDefn *poFieldIn,
OGRErr OGRCARTOTableLayer::CreateField(const OGRFieldDefn *poFieldIn,
CPL_UNUSED int bApproxOK)
{
GetLayerDefn();
Expand Down
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/csv/ogr_csv.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ class OGRCSVLayer final : public IOGRCSVLayer, public OGRLayer

int TestCapability(const char *) override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;

static OGRCSVCreateFieldAction
PreCreateField(OGRFeatureDefn *poFeatureDefn,
const std::set<CPLString> &oSetFields,
OGRFieldDefn *poNewField, int bApproxOK);
const OGRFieldDefn *poNewField, int bApproxOK);
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poGeomField,
int bApproxOK = TRUE) override;

Expand Down
5 changes: 3 additions & 2 deletions ogr/ogrsf_frmts/csv/ogrcsvdatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class OGRCSVEditableLayer final : public IOGRCSVLayer, public OGREditableLayer
->GetFileList();
}

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
virtual OGRErr DeleteField(int iField) override;
virtual OGRErr AlterFieldDefn(int iField, OGRFieldDefn *poNewFieldDefn,
Expand All @@ -356,7 +356,8 @@ OGRCSVEditableLayer::OGRCSVEditableLayer(OGRCSVLayer *poCSVLayer,
/* CreateField() */
/************************************************************************/

OGRErr OGRCSVEditableLayer::CreateField(OGRFieldDefn *poNewField, int bApproxOK)
OGRErr OGRCSVEditableLayer::CreateField(const OGRFieldDefn *poNewField,
int bApproxOK)

{
if (m_poEditableFeatureDefn->GetFieldCount() >= 10000)
Expand Down
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/csv/ogrcsvlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ int OGRCSVLayer::TestCapability(const char *pszCap)
OGRCSVCreateFieldAction
OGRCSVLayer::PreCreateField(OGRFeatureDefn *poFeatureDefn,
const std::set<CPLString> &oSetFields,
OGRFieldDefn *poNewField, int bApproxOK)
const OGRFieldDefn *poNewField, int bApproxOK)
{
// Does this duplicate an existing field?
if (oSetFields.find(CPLString(poNewField->GetNameRef()).toupper()) !=
Expand Down Expand Up @@ -1813,7 +1813,7 @@ OGRCSVLayer::PreCreateField(OGRFeatureDefn *poFeatureDefn,
/* CreateField() */
/************************************************************************/

OGRErr OGRCSVLayer::CreateField(OGRFieldDefn *poNewField, int bApproxOK)
OGRErr OGRCSVLayer::CreateField(const OGRFieldDefn *poNewField, int bApproxOK)

{
// If we have already written our field names, then we are not
Expand Down
6 changes: 4 additions & 2 deletions ogr/ogrsf_frmts/dxf/ogr_dxf.h
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,8 @@ class OGRDXFWriterLayer final : public OGRLayer

int TestCapability(const char *) override;
OGRErr ICreateFeature(OGRFeature *poFeature) override;
OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK = TRUE) override;
OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;

void ResetFP(VSILFILE *);

Expand Down Expand Up @@ -878,7 +879,8 @@ class OGRDXFBlocksWriterLayer final : public OGRLayer

int TestCapability(const char *) override;
OGRErr ICreateFeature(OGRFeature *poFeature) override;
OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK = TRUE) override;
OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;

std::vector<OGRFeature *> apoBlocks;
OGRFeature *FindBlock(const char *);
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/dxf/ogrdxfblockswriterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int OGRDXFBlocksWriterLayer::TestCapability(const char *pszCap)
/* This is really a dummy as our fields are precreated. */
/************************************************************************/

OGRErr OGRDXFBlocksWriterLayer::CreateField(OGRFieldDefn *poField,
OGRErr OGRDXFBlocksWriterLayer::CreateField(const OGRFieldDefn *poField,
int bApproxOK)

{
Expand Down
3 changes: 2 additions & 1 deletion ogr/ogrsf_frmts/dxf/ogrdxfwriterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ int OGRDXFWriterLayer::TestCapability(const char *pszCap)
/* This is really a dummy as our fields are precreated. */
/************************************************************************/

OGRErr OGRDXFWriterLayer::CreateField(OGRFieldDefn *poField, int bApproxOK)
OGRErr OGRDXFWriterLayer::CreateField(const OGRFieldDefn *poField,
int bApproxOK)

{
if (poFeatureDefn->GetFieldIndex(poField->GetNameRef()) >= 0 && bApproxOK)
Expand Down
3 changes: 2 additions & 1 deletion ogr/ogrsf_frmts/elastic/ogr_elastic.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ class OGRElasticLayer final : public OGRLayer
virtual OGRErr ICreateFeature(OGRFeature *poFeature) override;
virtual OGRErr ISetFeature(OGRFeature *poFeature) override;
OGRErr IUpsertFeature(OGRFeature *poFeature) override;
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK) override;
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK) override;
virtual OGRErr CreateGeomField(OGRGeomFieldDefn *poField,
int bApproxOK) override;

Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/elastic/ogrelasticlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2898,7 +2898,7 @@ bool OGRElasticLayer::PushIndex()
/* CreateField() */
/************************************************************************/

OGRErr OGRElasticLayer::CreateField(OGRFieldDefn *poFieldDefn,
OGRErr OGRElasticLayer::CreateField(const OGRFieldDefn *poFieldDefn,
int /*bApproxOK*/)
{
if (m_poDS->GetAccess() != GA_Update)
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/flatgeobuf/ogr_flatgeobuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class OGRFlatGeobufLayer final : public OGRLayer,

virtual OGRFeature *GetFeature(GIntBig nFeatureId) override;
virtual OGRFeature *GetNextFeature() override;
virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = true) override;
virtual OGRErr ICreateFeature(OGRFeature *poFeature) override;
virtual int TestCapability(const char *) override;
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/flatgeobuf/ogrflatgeobuflayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ int OGRFlatGeobufLayer::GetNextArrowArray(struct ArrowArrayStream *stream,
return errorErrno;
}

OGRErr OGRFlatGeobufLayer::CreateField(OGRFieldDefn *poField,
OGRErr OGRFlatGeobufLayer::CreateField(const OGRFieldDefn *poField,
int /* bApproxOK */)
{
// CPLDebugOnly("FlatGeobuf", "CreateField %s %s", poField->GetNameRef(),
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/generic/ogreditablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ int OGREditableLayer::TestCapability(const char *pszCap)
/* CreateField() */
/************************************************************************/

OGRErr OGREditableLayer::CreateField(OGRFieldDefn *poField, int bApproxOK)
OGRErr OGREditableLayer::CreateField(const OGRFieldDefn *poField, int bApproxOK)
{
if (!m_poDecoratedLayer)
return OGRERR_FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/generic/ogreditablelayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CPL_DLL OGREditableLayer : public OGRLayerDecorator

virtual int TestCapability(const char *) override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
virtual OGRErr DeleteField(int iField) override;
virtual OGRErr ReorderFields(int *panMap) override;
Expand Down
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/generic/ogremulatedtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class OGRLayerWithTransaction final : public OGRLayerDecorator
}
virtual OGRFeatureDefn *GetLayerDefn() override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
virtual OGRErr DeleteField(int iField) override;
virtual OGRErr ReorderFields(int *panMap) override;
Expand Down Expand Up @@ -610,7 +610,7 @@ OGRFeatureDefn *OGRLayerWithTransaction::GetLayerDefn()
return m_poFeatureDefn;
}

OGRErr OGRLayerWithTransaction::CreateField(OGRFieldDefn *poField,
OGRErr OGRLayerWithTransaction::CreateField(const OGRFieldDefn *poField,
int bApproxOK)
{
if (!m_poDecoratedLayer)
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/generic/ogrlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ OGRErr OGR_L_UpdateFeature(OGRLayerH hLayer, OGRFeatureH hFeat,
/* CreateField() */
/************************************************************************/

OGRErr OGRLayer::CreateField(OGRFieldDefn *poField, int bApproxOK)
OGRErr OGRLayer::CreateField(const OGRFieldDefn *poField, int bApproxOK)

{
(void)poField;
Expand Down
3 changes: 2 additions & 1 deletion ogr/ogrsf_frmts/generic/ogrlayerdecorator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ int OGRLayerDecorator::TestCapability(const char *pszCapability)
return m_poDecoratedLayer->TestCapability(pszCapability);
}

OGRErr OGRLayerDecorator::CreateField(OGRFieldDefn *poField, int bApproxOK)
OGRErr OGRLayerDecorator::CreateField(const OGRFieldDefn *poField,
int bApproxOK)
{
if (!m_poDecoratedLayer)
return OGRERR_FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/generic/ogrlayerdecorator.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class CPL_DLL OGRLayerDecorator : public OGRLayer

virtual int TestCapability(const char *) override;

virtual OGRErr CreateField(OGRFieldDefn *poField,
virtual OGRErr CreateField(const OGRFieldDefn *poField,
int bApproxOK = TRUE) override;
virtual OGRErr DeleteField(int iField) override;
virtual OGRErr ReorderFields(int *panMap) override;
Expand Down
Loading

0 comments on commit b06a9a3

Please sign in to comment.