Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
189
Issues
189
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
3f08e8a8
Commit
3f08e8a8
authored
Jan 07, 2019
by
Cédric Traizet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: replaced boost::bind by lambdas
parent
aed9feec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
otbOGRDataSourceWrapper.cxx
...les/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx
+1
-1
otbOGRFeatureWrapper.cxx
Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx
+2
-2
otbOGRLayerWrapper.cxx
Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx
+1
-1
No files found.
Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx
View file @
3f08e8a8
...
@@ -108,7 +108,7 @@ char const* DeduceDriverName(std::string filename)
...
@@ -108,7 +108,7 @@ char const* DeduceDriverName(std::string filename)
ExtensionDriverAssociation
const
*
whichIt
=
ExtensionDriverAssociation
const
*
whichIt
=
std
::
find_if
(
std
::
find_if
(
boost
::
begin
(
k_ExtensionDriverMap
),
boost
::
end
(
k_ExtensionDriverMap
),
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
))
if
(
whichIt
==
boost
::
end
(
k_ExtensionDriverMap
))
{
{
return
nullptr
;
// nothing found
return
nullptr
;
// nothing found
...
...
Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx
View file @
3f08e8a8
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
otb
::
ogr
::
Feature
::
Feature
(
OGRFeatureDefn
&
definition
)
otb
::
ogr
::
Feature
::
Feature
(
OGRFeatureDefn
&
definition
)
:
m_Feature
(
:
m_Feature
(
OGRFeature
::
CreateFeature
(
&
definition
),
OGRFeature
::
CreateFeature
(
&
definition
),
boost
::
bind
(
&
OGRFeature
::
DestroyFeature
,
_1
)
)
[
&
](
auto
const
&
x
)
{
return
OGRFeature
::
DestroyFeature
(
x
);}
)
{
{
CheckInvariants
();
CheckInvariants
();
}
}
...
@@ -52,7 +52,7 @@ otb::ogr::Feature::Feature(OGRFeature * feature)
...
@@ -52,7 +52,7 @@ otb::ogr::Feature::Feature(OGRFeature * feature)
{
{
if
(
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
// else default is perfect -> delete null
}
}
...
...
Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx
View file @
3f08e8a8
...
@@ -70,7 +70,7 @@ otb::ogr::Layer::Layer(OGRLayer* layer, bool modifiable)
...
@@ -70,7 +70,7 @@ otb::ogr::Layer::Layer(OGRLayer* layer, bool modifiable)
}
}
otb
::
ogr
::
Layer
::
Layer
(
OGRLayer
*
layer
,
GDALDataset
&
sourceInChargeOfLifeTime
,
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
)
,
m_Modifiable
(
modifiable
)
{
{
assert
(
layer
&&
"A null OGRlayer cannot belong to an OGRDataSource"
);
assert
(
layer
&&
"A null OGRlayer cannot belong to an OGRDataSource"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment