diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx index 10bcbbcd09983fad362a90efe28ea4c66750be5d..367e0d5389a17f3f34a42d8e0588d57519bc555d 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx @@ -108,7 +108,7 @@ char const* DeduceDriverName(std::string filename) ExtensionDriverAssociation const* whichIt = std::find_if( boost::begin(k_ExtensionDriverMap), boost::end(k_ExtensionDriverMap), - boost::bind(&ExtensionDriverAssociation::Matches, _1, extension)); + [&](auto const & x) { return x.Matches(extension); } ); if (whichIt == boost::end(k_ExtensionDriverMap)) { return nullptr; // nothing found diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx index 062bc52eadafc50ae99e36e3f3fb95c19d391c3f..20cb96ce876236d6b1384daf42a7b9659ddd7c47 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx @@ -43,7 +43,7 @@ otb::ogr::Feature::Feature(OGRFeatureDefn & definition) : m_Feature( OGRFeature::CreateFeature(&definition), - boost::bind(&OGRFeature::DestroyFeature, _1)) + [&](auto const & x) {return OGRFeature::DestroyFeature(x);}) { CheckInvariants(); } @@ -52,7 +52,7 @@ otb::ogr::Feature::Feature(OGRFeature * feature) { if (feature) { - m_Feature.reset(feature, boost::bind(&OGRFeature::DestroyFeature, _1)); + m_Feature.reset(feature, [&](auto const & x) {return OGRFeature::DestroyFeature(x);}); } // else default is perfect -> delete null } diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx index 97d5b7fe1356beb6b92143c5e6f73fdff52309c0..ff0d528171aceda6bb2164576e62ab7316d0437e 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx @@ -70,7 +70,7 @@ otb::ogr::Layer::Layer(OGRLayer* layer, bool modifiable) } otb::ogr::Layer::Layer(OGRLayer* layer, GDALDataset& sourceInChargeOfLifeTime, bool modifiable) -: m_Layer(layer, boost::bind(&GDALDataset::ReleaseResultSet, boost::ref(sourceInChargeOfLifeTime), _1)) +: m_Layer(layer, [&](auto const& x) { return sourceInChargeOfLifeTime.ReleaseResultSet(x); }) , m_Modifiable(modifiable) { assert(layer && "A null OGRlayer cannot belong to an OGRDataSource" );