[gdal-dev] Propose removing OGRRegisterAll(void); in ogrsf_frmts.h

Kurt Schwehr schwehr at gmail.com
Thu Dec 21 05:45:02 PST 2017


In Even's https://trac.osgeo.org/gdal/changeset/41094:

Even handles the multiple definitions of OGRRegisterAll().  I propose that
we remove the one from ogrsf_frmts.h ( which was not my first thought ).  I
think the common cases are:

1) you just want all the drivers registered and don't care about individual
registers, so just use ogr_api.h.  You will likely need it anyway.

2) you are definiting a register function and don't care
about OGRRegisterAll so include ogrsf_frmts.h

3) you want a specific driver registered and don't care
about OGRRegisterAll so include ogrsf_frmts.h

Cases 2 and 3 likely will have to include ogr_api.h to do their work, but
maybe not in a rare case.

Why add extra in case 1?

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171221/ae3da19f/attachment.html>


More information about the gdal-dev mailing list