Skip to content

Commit

Permalink
apply ClangFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Feb 13, 2025
1 parent 12e2dbc commit f62c3e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 6 additions & 4 deletions ogrgrass.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ class OGRGRASSLayer final : public OGRLayer
}
auto GetFeatureCount(int) -> GIntBig override;

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
auto IGetExtent(int iGeomField, OGREnvelope *psExtent, bool bForce) -> OGRErr override;
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 11, 0)
auto IGetExtent(int iGeomField, OGREnvelope *psExtent, bool bForce)
-> OGRErr override;
#else
auto GetExtent(OGREnvelope *psExtent, int bForce) -> OGRErr override;
virtual auto GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce)
Expand All @@ -69,8 +70,9 @@ class OGRGRASSLayer final : public OGRLayer
// Filters
virtual auto SetAttributeFilter(const char *query) -> OGRErr override;

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
virtual OGRErr ISetSpatialFilter(int iGeomField, const OGRGeometry *poGeom) override;
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 11, 0)
virtual OGRErr ISetSpatialFilter(int iGeomField,
const OGRGeometry *poGeom) override;
#else
virtual void SetSpatialFilter(OGRGeometry *poGeomIn) override;
virtual void SetSpatialFilter(int iGeomField, OGRGeometry *poGeom) override
Expand Down
14 changes: 8 additions & 6 deletions ogrgrasslayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,16 @@ auto OGRGRASSLayer::ResetSequentialCursor() -> bool
/************************************************************************/
/* SetSpatialFilter */
/************************************************************************/
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
OGRErr OGRGRASSLayer::ISetSpatialFilter(int iGeomField, const OGRGeometry *poGeomIn)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 11, 0)
OGRErr OGRGRASSLayer::ISetSpatialFilter(int iGeomField,
const OGRGeometry *poGeomIn)
#else
void OGRGRASSLayer::SetSpatialFilter(OGRGeometry *poGeomIn)
#endif
{
CPLDebug("GRASS", "SetSpatialFilter");

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 11, 0)
OGRLayer::ISetSpatialFilter(iGeomField, poGeomIn);
#else
OGRLayer::SetSpatialFilter(poGeomIn);
Expand All @@ -646,7 +647,7 @@ void OGRGRASSLayer::SetSpatialFilter(OGRGeometry *poGeomIn)
SetSpatialMatch();
}

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 11, 0)
return OGRERR_NONE;
#endif
}
Expand Down Expand Up @@ -1063,8 +1064,9 @@ auto OGRGRASSLayer::GetFeatureCount(int bForce) -> GIntBig
/* Returns OGRERR_NONE/OGRRERR_FAILURE. */
/************************************************************************/

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
auto OGRGRASSLayer::IGetExtent(int /*iGeomField */, OGREnvelope *psExtent, bool /*bForce*/) -> OGRErr
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 11, 0)
auto OGRGRASSLayer::IGetExtent(int /*iGeomField */, OGREnvelope *psExtent,
bool /*bForce*/) -> OGRErr
#else
auto OGRGRASSLayer::GetExtent(OGREnvelope *psExtent, int /*bForce*/) -> OGRErr
#endif
Expand Down

0 comments on commit f62c3e6

Please sign in to comment.