Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
8be4641d
Commit
8be4641d
authored
Feb 09, 2021
by
Laurențiu Nicola
Browse files
ENH: replace boost::shared_ptr with std::shared_ptr
parent
4842f48c
Pipeline
#6787
passed with stages
in 84 minutes and 53 seconds
Changes
13
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Modules/Adapters/GdalAdapters/include/otbOGRFeatureWrapper.h
View file @
8be4641d
...
...
@@ -21,15 +21,8 @@
#ifndef otbOGRFeatureWrapper_h
#define otbOGRFeatureWrapper_h
// #include <iosfwd> // std::ostream&
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#include
<boost/shared_ptr.hpp>
#pragma GCC diagnostic pop
#else
#include
<boost/shared_ptr.hpp>
#endif
#include
<memory>
// #include "itkIndent.h", included from field
#include
"otbOGRFieldWrapper.h"
#include
"otbOGRGeometryWrapper.h"
...
...
@@ -157,12 +150,12 @@ public:
* stored, without introducing a cyclic dependency, nor deporting the fields
* R/W to \c Feature interface.
*/
boo
st
::
shared_ptr
<
OGRFeature
>&
sptr
()
st
d
::
shared_ptr
<
OGRFeature
>&
sptr
()
{
return
m_Feature
;
}
/** \copydoc Feature::sptr() */
boo
st
::
shared_ptr
<
OGRFeature
>
const
&
sptr
()
const
st
d
::
shared_ptr
<
OGRFeature
>
const
&
sptr
()
const
{
return
m_Feature
;
}
...
...
@@ -368,7 +361,7 @@ private:
void
CheckInvariants
()
const
;
/** Internal pointer to the shared \c OGRFeature.
*/
boo
st
::
shared_ptr
<
OGRFeature
>
m_Feature
;
st
d
::
shared_ptr
<
OGRFeature
>
m_Feature
;
};
...
...
Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.h
View file @
8be4641d
...
...
@@ -21,8 +21,9 @@
#ifndef otbOGRFieldWrapper_h
#define otbOGRFieldWrapper_h
#include
<memory>
#include
<string>
#include
<boost/shared_ptr.hpp>
class
OGRFieldDefn
;
class
OGRFeature
;
#if defined(_MSC_VER)
...
...
@@ -224,7 +225,7 @@ private:
/// Definition of the field.
FieldDefn
m_Definition
;
/// Link to the actual \c OGRFeature in charge of the fields.
boo
st
::
shared_ptr
<
OGRFeature
>&
m_Feature
;
st
d
::
shared_ptr
<
OGRFeature
>&
m_Feature
;
/** Index of the field according to the feature definition.
* \internal
* All the fields decoding is at the wrong place (\c OGRFeature instead of
...
...
Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h
View file @
8be4641d
...
...
@@ -25,17 +25,16 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#include
<boost/shared_ptr.hpp>
#include
<boost/iterator/iterator_facade.hpp>
#include
<boost/utility/enable_if.hpp>
#pragma GCC diagnostic pop
#else
#include
<boost/shared_ptr.hpp>
#include
<boost/iterator/iterator_facade.hpp>
#include
<boost/utility/enable_if.hpp>
#endif
// #include "itkIndent.h", included from field
#include
"otbOGRFeatureWrapper.h"
#include
<memory>
#include
<string>
// #include "ogr_core.h" // OGRwkbGeometryType, included from feature -> field
...
...
@@ -568,7 +567,7 @@ private:
* unless this is the result of \c ExecuteSQL(). In that case a deleter is set
* to correctly release the layer.
*/
boo
st
::
shared_ptr
<
OGRLayer
>
m_Layer
;
st
d
::
shared_ptr
<
OGRLayer
>
m_Layer
;
bool
m_Modifiable
;
...
...
Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx
View file @
8be4641d
...
...
@@ -50,7 +50,7 @@
namespace
{
// Anonymous namespace
/**\ingroup GeometryInternals
* Deleter for \c
boo
st::shared_ptr<> that doesn't delete.
* Deleter for \c st
d
::shared_ptr<> that doesn't delete.
* This is required for \c OGRLayer s that belong to \c OGRDataSource.
* \internal Unlike OGR, works as a no-op on null geometries.
*/
...
...
Modules/Hyperspectral/Unmixing/include/otbISRAUnmixingImageFilter.h
View file @
8be4641d
...
...
@@ -24,7 +24,7 @@
#include
"itkNumericTraits.h"
#include
"otbFunctorImageFilter.h"
#include
"vnl/algo/vnl_svd.h"
#include
<
boost/shared_ptr.hpp
>
#include
<
memory
>
namespace
otb
{
...
...
@@ -80,7 +80,7 @@ private:
}
typedef
vnl_svd
<
PrecisionType
>
SVDType
;
typedef
boo
st
::
shared_ptr
<
SVDType
>
SVDPointerType
;
typedef
st
d
::
shared_ptr
<
SVDType
>
SVDPointerType
;
MatrixType
m_U
;
SVDPointerType
m_Svd
;
// SVD of U
...
...
Modules/Hyperspectral/Unmixing/include/otbUnConstrainedLeastSquareImageFilter.h
View file @
8be4641d
...
...
@@ -24,7 +24,7 @@
#include
"itkMacro.h"
#include
"otbFunctorImageFilter.h"
#include
"vnl/algo/vnl_svd.h"
#include
<
boost/shared_ptr.hpp
>
#include
<
memory
>
namespace
otb
{
...
...
@@ -62,7 +62,7 @@ public:
private:
typedef
vnl_svd
<
PrecisionType
>
SVDType
;
typedef
boo
st
::
shared_ptr
<
SVDType
>
SVDPointerType
;
typedef
st
d
::
shared_ptr
<
SVDType
>
SVDPointerType
;
unsigned
int
m_OutputSize
;
SVDPointerType
m_Svd
;
...
...
Modules/IO/ImageIO/include/otbMultiImageFileWriter.h
View file @
8be4641d
...
...
@@ -28,7 +28,7 @@
#include
"itkImageIOBase.h"
#include
"OTBImageIOExport.h"
#include
<
boost/shared_ptr.hpp
>
#include
<
memory
>
namespace
otb
{
...
...
@@ -234,7 +234,7 @@ private:
virtual
void
WriteImageInformation
()
=
0
;
virtual
void
Write
(
const
RegionType
&
streamRegion
)
=
0
;
virtual
bool
CanStreamWrite
()
const
=
0
;
typedef
boo
st
::
shared_ptr
<
SinkBase
>
Pointer
;
typedef
st
d
::
shared_ptr
<
SinkBase
>
Pointer
;
virtual
itk
::
ImageRegion
<
2
>
GetRegionToWrite
()
const
=
0
;
...
...
@@ -266,7 +266,7 @@ private:
void
WriteImageInformation
()
override
;
void
Write
(
const
RegionType
&
streamRegion
)
override
;
bool
CanStreamWrite
()
const
override
;
typedef
boo
st
::
shared_ptr
<
Sink
>
Pointer
;
typedef
st
d
::
shared_ptr
<
Sink
>
Pointer
;
/** Get the region that should be written. By default this is the largest possible region
* of the input image, but this might be overridden by the box extended filename parameter of
...
...
@@ -282,8 +282,8 @@ private:
};
/** The list of inputs and their associated parameters, built using AddInput */
typedef
std
::
vector
<
boo
st
::
shared_ptr
<
SinkBase
>>
SinkListType
;
SinkListType
m_SinkList
;
typedef
std
::
vector
<
st
d
::
shared_ptr
<
SinkBase
>>
SinkListType
;
SinkListType
m_SinkList
;
std
::
vector
<
RegionType
>
m_StreamRegionList
;
};
...
...
Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.h
View file @
8be4641d
...
...
@@ -20,7 +20,8 @@
#ifndef otbSharkKMeansMachineLearningModel_h
#define otbSharkKMeansMachineLearningModel_h
#include
"boost/shared_ptr.hpp"
#include
<memory>
#include
"itkLightObject.h"
#include
"otbMachineLearningModel.h"
...
...
@@ -163,7 +164,7 @@ private:
shark
::
Centroids
m_Centroids
;
/** shark Model could be SoftClusteringModel or HardClusteringModel */
boo
st
::
shared_ptr
<
ClusteringModelType
>
m_ClusteringModel
;
st
d
::
shared_ptr
<
ClusteringModelType
>
m_ClusteringModel
;
};
}
// end namespace otb
...
...
Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.hxx
View file @
8be4641d
...
...
@@ -21,7 +21,8 @@
#define otbSharkKMeansMachineLearningModel_hxx
#include
<fstream>
#include
"boost/make_shared.hpp"
#include
<utility>
#include
"itkMacro.h"
#include
"otbSharkKMeansMachineLearningModel.h"
...
...
@@ -52,7 +53,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue>::SharkKMeansMachineLe
{
// Default set HardClusteringModel
this
->
m_ConfidenceIndex
=
true
;
m_ClusteringModel
=
boo
st
::
make_shared
<
ClusteringModelType
>
(
&
m_Centroids
);
m_ClusteringModel
=
st
d
::
make_shared
<
ClusteringModelType
>
(
&
m_Centroids
);
}
...
...
@@ -72,7 +73,7 @@ void SharkKMeansMachineLearningModel<TInputValue, TOutputValue>::Train()
// Use a Hard Clustering Model for classification
shark
::
kMeans
(
data
,
m_K
,
m_Centroids
,
m_MaximumNumberOfIterations
);
m_ClusteringModel
=
boo
st
::
make_shared
<
ClusteringModelType
>
(
&
m_Centroids
);
m_ClusteringModel
=
st
d
::
make_shared
<
ClusteringModelType
>
(
&
m_Centroids
);
}
template
<
class
TInputValue
,
class
TOutputValue
>
...
...
Modules/Radiometry/Simulation/include/otbSpectralResponse.h
View file @
8be4641d
...
...
@@ -32,8 +32,6 @@
#include
"otbAtmosphericCorrectionParameters.h"
#include
<boost/shared_ptr.hpp>
namespace
otb
{
/** \class SpectralResponse
...
...
@@ -68,7 +66,7 @@ public:
typedef
TValuePrecision
ValuePrecisionType
;
typedef
std
::
pair
<
TPrecision
,
TValuePrecision
>
PairType
;
// typedef
boo
st::shared_ptr<PairType> PairPointerType;
// typedef st
d
::shared_ptr<PairType> PairPointerType;
typedef
typename
std
::
vector
<
PairType
>
VectorPairType
;
/** Standard image typedef */
...
...
Modules/Radiometry/Simulation/src/otbProspectModel.cxx
View file @
8be4641d
...
...
@@ -23,7 +23,6 @@
#include
"otbProspectModel.h"
#include
"otb_boost_expint_header.h"
#include
<boost/shared_ptr.hpp>
#include
"otbMath.h"
// TODO check EPSILON matlab
...
...
Modules/Radiometry/Simulation/src/otbSailModel.cxx
View file @
8be4641d
...
...
@@ -22,7 +22,6 @@
#include
"otbSailModel.h"
#include
"otb_boost_expint_header.h"
#include
<boost/shared_ptr.hpp>
#include
"otbMath.h"
// TODO check EPSILON matlab
...
...
Modules/ThirdParty/SiftFast/src/otbsiftfast/siftfastpy.cpp
View file @
8be4641d
...
...
@@ -16,7 +16,6 @@
#define BOOST_ENABLE_ASSERT_HANDLER
#include
<vector>
#include
<boost/shared_ptr.hpp>
#define PY_ARRAY_UNIQUE_SYMBOL PyArrayHandle
#include
<boost/python.hpp>
...
...
Write
Preview
Supports
Markdown
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