[gdal-dev] int versus bool in C++ method args

Even Rouault even.rouault at spatialys.com
Tue Feb 20 10:37:25 PST 2018


On mardi 20 février 2018 07:23:48 CET Kurt Schwehr wrote:
> Hi Even,
> 
> With https://trac.osgeo.org/gdal/changeset/41510, would it be possible to
> use a bool for bDelete since this is a member of a C++ class?  Any C API
> call could easily convert from an int to a bool and then we have cleaner
> internals for the C++ side of the house.  Or is there some other reason
> that had you using an int boolean?
> 
> OGRErr          removeCurve( int iIndex, int bDelete = TRUE );*

Hi Kurt,

good point. I blindly copied it from similar OGRGeometryCollection::removeGeometry()

Just changed the new methods to use bool

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180220/2920d638/attachment-0001.html>


More information about the gdal-dev mailing list