ubarsc / kealib

KEALib provides an implementation of the GDAL data model. The format supports raster attribute tables, image pyramids, meta-data and in-built statistics while also handling very large files and compression throughout.
http://kealib.org/
MIT License
12 stars 7 forks source link

Update C++ Style #23

Closed gillins closed 2 years ago

gillins commented 2 years ago

The ABI with previous versions is broken with 1.5.x so maybe a chance to also update some of the functions to match the C++ Core Guidelines? I'm thinking only in ways that won't mean changing user code, but as they will have to recompile anyway we have a bit of flexibility to make it consistent with code elsewhere.

In particular passing std::string by const reference and catching exceptions by const reference. The latter will need to happen in the gdal driver as well (already been done in the gdal bundled version).

What do you think @petebunting ? Is there anything else we could be doing?

petebunting commented 2 years ago

Hi @gillins, I think those are the main ones. Could use auto when defining iterators etc. which would make could a little tidier.

gillins commented 2 years ago

Good point about auto - now that we don't have to support VS2008 (had been required for Python 2.7 and ancient versions of ArcGIS) this is a good time to do this. I'll see if I can put together an initial PR with these changes.