From eb259c64c4620cd0b2fee377c378f9e29b349053 Mon Sep 17 00:00:00 2001 From: Laurentiu Nicola <lnicola@dend.ro> Date: Mon, 9 Jul 2018 12:03:53 +0300 Subject: [PATCH] ENH: Use std instead of vcl headers find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/vcl_(algorithm|complex|cmath)\.h/\1/g" find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri "s/std::complex\.h/complex/g" find \( -name "*.hxx" -or -name "*.h" -or -name "*.cxx" \) -not -path "*ThirdParty*" -print0 | xargs -0 sed -sri 's/#include "(algorithm|cmath|complex)"/#include <\1>/g' --- .../Applications/AppSegmentation/app/otbLSMSSegmentation.cxx | 2 +- .../AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx | 2 +- .../Applications/AppSegmentation/app/otbLSMSVectorization.cxx | 2 +- Modules/Core/Common/include/otbMath.h | 4 ++-- .../Polarimetry/include/otbPolarimetricSynthesisFunctor.h | 2 +- ...inearCovarianceToReciprocalCircularCovarianceImageFilter.h | 2 +- .../include/otbSinclairToCircularCovarianceMatrixFunctor.h | 2 +- .../Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h | 2 +- .../include/otbSinclairToCovarianceMatrixFunctor.h | 2 +- .../Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h | 2 +- .../otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h | 2 +- .../include/otbSinclairToReciprocalCoherencyMatrixFunctor.h | 2 +- .../include/otbSinclairToReciprocalCovarianceMatrixFunctor.h | 2 +- .../Polarimetry/test/otbPolarimetricSynthesisFunctor.cxx | 4 ++-- .../Smoothing/include/otbMeanShiftSmoothingImageFilter.h | 2 +- Modules/Filtering/TimeSeries/include/otbTimeSeries.h | 2 +- Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx | 2 +- .../include/otbEigenvalueLikelihoodMaximisation.hxx | 2 +- .../EndmembersExtraction/include/otbVirtualDimensionality.hxx | 2 +- .../Registration/Stereo/include/otbAdhesionCorrectionFilter.h | 2 +- Modules/Visualization/Ice/include/otbGlImageActor.h | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx index d6942c0067..f940b88641 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx @@ -35,7 +35,7 @@ #include "otbImportGeoInformationImageFilter.h" #include <time.h> -#include <vcl_algorithm.h> +#include <algorithm> #include "otbWrapperApplication.h" #include "otbWrapperApplicationFactory.h" diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx index b6a95b0dbb..a0ee5f7b50 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx @@ -30,7 +30,7 @@ #include "otbTileImageFilter.h" #include <time.h> -#include <vcl_algorithm.h> +#include <algorithm> #include <climits> #include "otbWrapperApplication.h" diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx index 98f4194285..ec8548865e 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx @@ -29,7 +29,7 @@ #include "otbOGRFeatureWrapper.h" #include <time.h> -#include <vcl_algorithm.h> +#include <algorithm> namespace otb { diff --git a/Modules/Core/Common/include/otbMath.h b/Modules/Core/Common/include/otbMath.h index 5e65c0530f..966b5a12dd 100644 --- a/Modules/Core/Common/include/otbMath.h +++ b/Modules/Core/Common/include/otbMath.h @@ -28,7 +28,7 @@ * All mathematics constans, functions (used in the OTB code) are the vcl version (vcl..., CONST_PI, ). */ -#include "vcl_cmath.h" +#include <cmath> namespace otb { @@ -37,7 +37,7 @@ namespace otb { #define _MATH_DEFINES_DEFINED #endif -/** Define constants if not define in the "vcl_cmath.h" */ +/** Define constants if not define in the "cmath" */ /* Some useful constants. */ const double CONST_E = 2.7182818284590452354; /* e */ diff --git a/Modules/Filtering/Polarimetry/include/otbPolarimetricSynthesisFunctor.h b/Modules/Filtering/Polarimetry/include/otbPolarimetricSynthesisFunctor.h index 1d00b491f2..3e607f4ae2 100644 --- a/Modules/Filtering/Polarimetry/include/otbPolarimetricSynthesisFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbPolarimetricSynthesisFunctor.h @@ -22,7 +22,7 @@ #define otbPolarimetricSynthesisFunctor_h #include "otbMath.h" -#include "std::complex.h" +#include <complex> #include "itkFixedArray.h" namespace otb diff --git a/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h b/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h index 2ccc69ccf0..6cf8ea7e2a 100644 --- a/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h +++ b/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h @@ -23,7 +23,7 @@ #define otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter_h #include "itkUnaryFunctorImageFilter.h" -#include "std::complex.h" +#include <complex> namespace otb { diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h index 4a0dddeb27..cc9c9fe283 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h @@ -21,7 +21,7 @@ #ifndef otbSinclairToCircularCovarianceMatrixFunctor_h #define otbSinclairToCircularCovarianceMatrixFunctor_h -#include "std::complex.h" +#include <complex> #include "otbSinclairToCovarianceMatrixFunctor.h" namespace otb diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h index ff65105ab3..e21d9635e8 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h @@ -21,7 +21,7 @@ #ifndef otbSinclairToCoherencyMatrixFunctor_h #define otbSinclairToCoherencyMatrixFunctor_h -#include "std::complex.h" +#include <complex> namespace otb { diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h index 03416a4f61..9decec618f 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h @@ -21,7 +21,7 @@ #ifndef otbSinclairToCovarianceMatrixFunctor_h #define otbSinclairToCovarianceMatrixFunctor_h -#include "std::complex.h" +#include <complex> namespace otb { diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h index 800876df56..893fdb2158 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h @@ -21,7 +21,7 @@ #ifndef otbSinclairToMuellerMatrixFunctor_h #define otbSinclairToMuellerMatrixFunctor_h -#include "std::complex.h" +#include <complex> namespace otb { diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h index 4c179f8f70..02fe39e304 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h @@ -21,7 +21,7 @@ #ifndef otbSinclairToReciprocalCircularCovarianceMatrixFunctor_h #define otbSinclairToReciprocalCircularCovarianceMatrixFunctor_h -#include "std::complex.h" +#include <complex> #include "otbSinclairToReciprocalCovarianceMatrixFunctor.h" namespace otb diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCoherencyMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCoherencyMatrixFunctor.h index a353fb787f..f9a3ec46f7 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCoherencyMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCoherencyMatrixFunctor.h @@ -22,7 +22,7 @@ #define otbSinclairToReciprocalCoherencyMatrixFunctor_h #include "itkMacro.h" -#include "std::complex.h" +#include <complex> #include "otbMath.h" #include "vnl/vnl_matrix.h" diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCovarianceMatrixFunctor.h index a1cc099a65..f24ee87fdb 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToReciprocalCovarianceMatrixFunctor.h @@ -21,7 +21,7 @@ #ifndef otbSinclairToReciprocalCovarianceMatrixFunctor_h #define otbSinclairToReciprocalCovarianceMatrixFunctor_h -#include "std::complex.h" +#include <complex> #include "otbMath.h" #include "vnl/vnl_matrix.h" diff --git a/Modules/Filtering/Polarimetry/test/otbPolarimetricSynthesisFunctor.cxx b/Modules/Filtering/Polarimetry/test/otbPolarimetricSynthesisFunctor.cxx index 65661769d5..2acdf6da00 100644 --- a/Modules/Filtering/Polarimetry/test/otbPolarimetricSynthesisFunctor.cxx +++ b/Modules/Filtering/Polarimetry/test/otbPolarimetricSynthesisFunctor.cxx @@ -18,8 +18,8 @@ * limitations under the License. */ -#include "std::complex.h" -#include "vcl_cmath.h" +#include <complex> +#include <cmath> #include "otbPolarimetricSynthesisFunctor.h" int otbPolarimetricSynthesisFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[]) diff --git a/Modules/Filtering/Smoothing/include/otbMeanShiftSmoothingImageFilter.h b/Modules/Filtering/Smoothing/include/otbMeanShiftSmoothingImageFilter.h index 6b7af43801..316bd2f939 100644 --- a/Modules/Filtering/Smoothing/include/otbMeanShiftSmoothingImageFilter.h +++ b/Modules/Filtering/Smoothing/include/otbMeanShiftSmoothingImageFilter.h @@ -26,7 +26,7 @@ #include "itkImageToImageFilter.h" #include "itkImageRegionConstIterator.h" #include "itkImageRegionConstIteratorWithIndex.h" -#include <vcl_algorithm.h> +#include <algorithm> namespace otb diff --git a/Modules/Filtering/TimeSeries/include/otbTimeSeries.h b/Modules/Filtering/TimeSeries/include/otbTimeSeries.h index 2e3f180459..0631825ea4 100644 --- a/Modules/Filtering/TimeSeries/include/otbTimeSeries.h +++ b/Modules/Filtering/TimeSeries/include/otbTimeSeries.h @@ -22,7 +22,7 @@ #define otbTimeSeries_h #include "itkFixedArray.h" -#include <vcl_cmath.h> +#include <cmath> namespace otb { diff --git a/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx b/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx index 4d817eda57..7680210873 100644 --- a/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx +++ b/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx @@ -22,7 +22,7 @@ #include "otbWaveletGenerator.h" -#include <vcl_cmath.h> +#include <cmath> #include "itkMacro.h" #include "otbMath.h" diff --git a/Modules/Hyperspectral/EndmembersExtraction/include/otbEigenvalueLikelihoodMaximisation.hxx b/Modules/Hyperspectral/EndmembersExtraction/include/otbEigenvalueLikelihoodMaximisation.hxx index 621195c3dd..296218322d 100644 --- a/Modules/Hyperspectral/EndmembersExtraction/include/otbEigenvalueLikelihoodMaximisation.hxx +++ b/Modules/Hyperspectral/EndmembersExtraction/include/otbEigenvalueLikelihoodMaximisation.hxx @@ -24,7 +24,7 @@ #include "otbEigenvalueLikelihoodMaximisation.h" -#include <vcl_algorithm.h> +#include <algorithm> namespace otb { diff --git a/Modules/Hyperspectral/EndmembersExtraction/include/otbVirtualDimensionality.hxx b/Modules/Hyperspectral/EndmembersExtraction/include/otbVirtualDimensionality.hxx index e9cd3213df..5feafb1bb6 100644 --- a/Modules/Hyperspectral/EndmembersExtraction/include/otbVirtualDimensionality.hxx +++ b/Modules/Hyperspectral/EndmembersExtraction/include/otbVirtualDimensionality.hxx @@ -24,7 +24,7 @@ #include "otbVirtualDimensionality.h" -#include <vcl_algorithm.h> +#include <algorithm> #include "otb_boost_math_normal_header.h" namespace otb diff --git a/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.h b/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.h index 52128fc0fc..71506f6b38 100644 --- a/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.h +++ b/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.h @@ -26,7 +26,7 @@ #include "itkConstNeighborhoodIterator.h" #include "itkImageRegionConstIterator.h" #include "itkImageLinearConstIteratorWithIndex.h" -#include <vcl_algorithm.h> +#include <algorithm> namespace otb { diff --git a/Modules/Visualization/Ice/include/otbGlImageActor.h b/Modules/Visualization/Ice/include/otbGlImageActor.h index d155ce9f46..8311e1d6e6 100644 --- a/Modules/Visualization/Ice/include/otbGlImageActor.h +++ b/Modules/Visualization/Ice/include/otbGlImageActor.h @@ -22,7 +22,7 @@ #define otb_GlImageActor_h -#include <vcl_algorithm.h> +#include <algorithm> #include "itkCenteredRigid2DTransform.h" -- GitLab