+1 on the range based for +1 on std::unique_ptr, but ... I think GDAL should stick to these:
- Do not do "using std::unique_ptr;" - Do not exposed std::unique_ptr to any public interfaces (for the time being) On Tue, Dec 12, 2017 at 4:06 AM, Even Rouault <even.roua...@spatialys.com> wrote: > > 1. std::unique_ptr > > > > > [...] > > > > > > Hopefully this will help to reduce the incidence of memory leaks. > > > > +1, that's one of the benefits of C++11 > > > > > > -- > > > > > > 2. auto > > > > > > I'd like to not have to write > > > > > > for( std::vector<std::unique_ptr<OGRFeature>>::iterator oIt = > > > apoMyList.begin(); > > > > > > and simply write > > > > > > for( auto oIt = apoMyList.begin(); > > > > +1. You could even use range based loop > > > > for( auto& olt: apoMyList ) > > > > (or auto const& depending on what you want to do with it) > > > > Even > > > > -- > > Spatialys - Geospatial professional services > > http://www.spatialys.com > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev > -- -- http://schwehr.org
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev