From 40eb5a414b0f97426aa1cc6cf53779ae60e6fb1a Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@cnes.fr> Date: Wed, 29 Aug 2018 13:19:23 +0200 Subject: [PATCH] COMP: cannot convert proportions getter to pointer, return a const reference instead --- .../LearningBase/include/otbSEMClassifier.h | 6 +++--- .../LearningBase/include/otbSEMClassifier.hxx | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/Modules/Learning/LearningBase/include/otbSEMClassifier.h b/Modules/Learning/LearningBase/include/otbSEMClassifier.h index 0a0af75660..479e5829ad 100644 --- a/Modules/Learning/LearningBase/include/otbSEMClassifier.h +++ b/Modules/Learning/LearningBase/include/otbSEMClassifier.h @@ -125,11 +125,11 @@ public: * vector should be same as the number of component (or classes). * Choose between SetInitialProportions, SetClassLabels or * SetNumberOfComponents */ - void SetInitialProportions(ProportionVectorType& propotion); - ProportionVectorType* GetInitialProportions(); + void SetInitialProportions(ProportionVectorType& proportions); + itkGetConstReferenceMacro(InitialProportions,ProportionVectorType); /** Gets the result proportion values */ - ProportionVectorType* GetProportions(); + itkGetConstReferenceMacro(Proportions,ProportionVectorType); /** Set/Gets the initial segmentation. the size of the vector should be * the same as the number of samples (length of MeasurementVector) */ diff --git a/Modules/Learning/LearningBase/include/otbSEMClassifier.hxx b/Modules/Learning/LearningBase/include/otbSEMClassifier.hxx index dc68749418..554049cd32 100644 --- a/Modules/Learning/LearningBase/include/otbSEMClassifier.hxx +++ b/Modules/Learning/LearningBase/include/otbSEMClassifier.hxx @@ -99,14 +99,6 @@ SEMClassifier<TInputImage, TOutputImage> m_ExternalLabels = 0; } -template<class TInputImage, class TOutputImage> -typename SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType* -SEMClassifier<TInputImage, TOutputImage> -::GetInitialProportions() -{ - return m_InitialProportions; -} - template<class TInputImage, class TOutputImage> void SEMClassifier<TInputImage, TOutputImage> @@ -228,14 +220,6 @@ SEMClassifier<TInputImage, TOutputImage> return m_ClassLabels; } -template<class TInputImage, class TOutputImage> -typename SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType* -SEMClassifier<TInputImage, TOutputImage> -::GetProportions() -{ - return &m_Proportions; -} - template<class TInputImage, class TOutputImage> void SEMClassifier<TInputImage, TOutputImage> -- GitLab