From 2eb60344f7f0d4e53cc7221c5bb3e0de357751cc Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@orfeo-toolbox.org> Date: Mon, 23 Feb 2015 16:00:34 +0100 Subject: [PATCH] WRG: Fixing shadowed variables warnings --- .../include/otbShapeAttributesLabelMapFilter.txx | 16 ++++++++-------- .../include/otbConcatenateVectorDataFilter.txx | 4 ++-- .../include/otbBayesianFusionFilter.txx | 2 +- .../include/otbVcaImageFilter.txx | 2 +- Modules/Wrappers/SWIG/src/itkPyCommand.cxx | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Modules/Feature/Moments/include/otbShapeAttributesLabelMapFilter.txx b/Modules/Feature/Moments/include/otbShapeAttributesLabelMapFilter.txx index 44ffb6e876..5e92a9514c 100644 --- a/Modules/Feature/Moments/include/otbShapeAttributesLabelMapFilter.txx +++ b/Modules/Feature/Moments/include/otbShapeAttributesLabelMapFilter.txx @@ -563,13 +563,13 @@ ShapeAttributesLabelObjectFunctor<TLabelObject, TLabelImage> if (m_ComputeFeretDiameter) { // init the vars - unsigned long size = 0; + unsigned long ssize = 0; typedef typename std::deque<typename LabelObjectType::IndexType> IndexListType; IndexListType idxList; // Line iterator - ConstLineIteratorType lit = ConstLineIteratorType(lo); - lit.GoToBegin(); + ConstLineIteratorType llit = ConstLineIteratorType(lo); + llit.GoToBegin(); typedef typename itk::ConstNeighborhoodIterator<LabelImageType> NeighborIteratorType; typename TLabelImage::SizeType neighborHoodRadius; @@ -582,10 +582,10 @@ ShapeAttributesLabelObjectFunctor<TLabelObject, TLabelImage> it.GoToBegin(); // iterate over all the lines - while ( !lit.IsAtEnd() ) + while ( !llit.IsAtEnd() ) { - const typename LabelObjectType::IndexType& firstIdx = lit.GetLine().GetIndex(); - unsigned long length = lit.GetLine().GetLength(); + const typename LabelObjectType::IndexType& firstIdx = llit.GetLine().GetIndex(); + unsigned long length = llit.GetLine().GetLength(); long endIdx0 = firstIdx[0] + length; for (typename LabelObjectType::IndexType idx = firstIdx; idx[0] < endIdx0; idx[0]++) @@ -600,12 +600,12 @@ ShapeAttributesLabelObjectFunctor<TLabelObject, TLabelImage> if (it.GetPixel(i) != label) { idxList.push_back(idx); - size++; + ssize++; break; } } } - ++lit; + ++llit; } // we can now search the feret diameter diff --git a/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx b/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx index 70356b76b1..0145df2ff7 100644 --- a/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx +++ b/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx @@ -109,9 +109,9 @@ ConcatenateVectorDataFilter<TVectorData> { // Add the current vectordata TreeNodeType * - inputRoot = const_cast<TreeNodeType *>(this->GetInput(idx)->GetDataTree()->GetRoot()); + currentInputRoot = const_cast<TreeNodeType *>(this->GetInput(idx)->GetDataTree()->GetRoot()); - ProcessNode(inputRoot, outputDocument); + ProcessNode(currentInputRoot, outputDocument); } diff --git a/Modules/Fusion/PanSharpening/include/otbBayesianFusionFilter.txx b/Modules/Fusion/PanSharpening/include/otbBayesianFusionFilter.txx index f96331eebd..c0a4e0b684 100644 --- a/Modules/Fusion/PanSharpening/include/otbBayesianFusionFilter.txx +++ b/Modules/Fusion/PanSharpening/include/otbBayesianFusionFilter.txx @@ -131,7 +131,7 @@ BayesianFusionFilter<TInputMultiSpectralImage, covComputefilter->SetInput(multiSpecInterp); covComputefilter->Update(); - MatrixType m_CovarianceMatrix = covComputefilter->GetCovariance(); + m_CovarianceMatrix = covComputefilter->GetCovariance(); otbMsgDebugMacro(<< "Covariance: " << m_CovarianceMatrix); m_CovarianceInvMatrix = m_CovarianceMatrix.GetInverse(); diff --git a/Modules/Hyperspectral/EndmembersExtraction/include/otbVcaImageFilter.txx b/Modules/Hyperspectral/EndmembersExtraction/include/otbVcaImageFilter.txx index 33cc06092d..0987179c6b 100644 --- a/Modules/Hyperspectral/EndmembersExtraction/include/otbVcaImageFilter.txx +++ b/Modules/Hyperspectral/EndmembersExtraction/include/otbVcaImageFilter.txx @@ -92,7 +92,7 @@ void VCAImageFilter<TImage>::GenerateData() vnl_matrix<PrecisionType> R = statsInput->GetCorrelation().GetVnlMatrix(); vnl_svd<PrecisionType> svd(R); vnl_matrix<PrecisionType> U = svd.U(); - vnl_matrix<PrecisionType> Ud = U.get_n_columns(0, m_NumberOfEndmembers); + Ud = U.get_n_columns(0, m_NumberOfEndmembers); vnl_matrix<PrecisionType> Udt = Ud.transpose(); // To remove the mean diff --git a/Modules/Wrappers/SWIG/src/itkPyCommand.cxx b/Modules/Wrappers/SWIG/src/itkPyCommand.cxx index 8ae1cc9476..e7b17d9f23 100644 --- a/Modules/Wrappers/SWIG/src/itkPyCommand.cxx +++ b/Modules/Wrappers/SWIG/src/itkPyCommand.cxx @@ -33,9 +33,9 @@ PyCommand::~PyCommand() this->obj = NULL; } -void PyCommand::SetCommandCallable(PyObject *obj) +void PyCommand::SetCommandCallable(PyObject *theObj) { - if (obj != this->obj) + if (theObj != this->obj) { if (this->obj) { @@ -44,7 +44,7 @@ void PyCommand::SetCommandCallable(PyObject *obj) } // store the new object - this->obj = obj; + this->obj = theObj; if (this->obj) { -- GitLab