From 4b5842f718ef6ca17b8862150ee8bbacf0f725ac Mon Sep 17 00:00:00 2001 From: Lee Newberg Date: Fri, 23 Sep 2022 10:49:32 -0400 Subject: [PATCH] STYLE: Method local variables should not have `m_` prefix --- .../Core/Common/src/itkObjectFactoryBase.cxx | 4 ++-- .../include/itkConnectedRegionsMeshFilter.hxx | 4 ++-- .../IO/GDCM/src/itkGDCMSeriesFileNames.cxx | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Modules/Core/Common/src/itkObjectFactoryBase.cxx b/Modules/Core/Common/src/itkObjectFactoryBase.cxx index 8065e89e739..c6a62b244ed 100644 --- a/Modules/Core/Common/src/itkObjectFactoryBase.cxx +++ b/Modules/Core/Common/src/itkObjectFactoryBase.cxx @@ -100,9 +100,9 @@ class ObjectFactoryBasePrivate : public LightObject ~ObjectFactoryBasePrivate() override { itk::ObjectFactoryBase::UnRegisterAllFactories(); - for (auto & m_InternalFactorie : m_InternalFactories) + for (auto & internalFactory : m_InternalFactories) { - m_InternalFactorie->UnRegister(); + internalFactory->UnRegister(); } } diff --git a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx index 074c2944b05..4eea64ef367 100644 --- a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx @@ -388,9 +388,9 @@ ConnectedRegionsMeshFilter::GenerateData() if (this->GetDebug()) { SizeValueType count = 0; - for (const auto & m_RegionSize : m_RegionSizes) + for (const auto & regionSize : m_RegionSizes) { - count += m_RegionSize; + count += regionSize; } itkDebugMacro(<< "Total #of cells accounted for: " << count); itkDebugMacro(<< "Extracted " << output->GetNumberOfCells() << " cells"); diff --git a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx index fd9eb29df7d..c2aad483a6e 100644 --- a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx +++ b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx @@ -209,40 +209,40 @@ GDCMSeriesFileNames::GetOutputFileNames() if (!m_InputFileNames.empty()) { bool hasExtension = false; - for (const auto & m_InputFileName : m_InputFileNames) + for (const auto & inputFileName : m_InputFileNames) { // look for extension ".dcm" and ".DCM" - std::string::size_type dcmPos = m_InputFileName.rfind(".dcm"); - if ((dcmPos != std::string::npos) && (dcmPos == m_InputFileName.length() - 4)) + std::string::size_type dcmPos = inputFileName.rfind(".dcm"); + if ((dcmPos != std::string::npos) && (dcmPos == inputFileName.length() - 4)) { hasExtension = true; } else { - dcmPos = m_InputFileName.rfind(".DCM"); - if ((dcmPos != std::string::npos) && (dcmPos == m_InputFileName.length() - 4)) + dcmPos = inputFileName.rfind(".DCM"); + if ((dcmPos != std::string::npos) && (dcmPos == inputFileName.length() - 4)) { hasExtension = true; } } // look for extension ".dicom" and ".DICOM" - std::string::size_type dicomPos = m_InputFileName.rfind(".dicom"); - if ((dicomPos != std::string::npos) && (dicomPos == m_InputFileName.length() - 6)) + std::string::size_type dicomPos = inputFileName.rfind(".dicom"); + if ((dicomPos != std::string::npos) && (dicomPos == inputFileName.length() - 6)) { hasExtension = true; } else { - dicomPos = m_InputFileName.rfind(".DICOM"); - if ((dicomPos != std::string::npos) && (dicomPos == m_InputFileName.length() - 6)) + dicomPos = inputFileName.rfind(".DICOM"); + if ((dicomPos != std::string::npos) && (dicomPos == inputFileName.length() - 6)) { hasExtension = true; } } // construct a filename, adding an extension if necessary - std::string filename = m_OutputDirectory + itksys::SystemTools::GetFilenameName(m_InputFileName); + std::string filename = m_OutputDirectory + itksys::SystemTools::GetFilenameName(inputFileName); if (!hasExtension) { // input filename has no extension, add a ".dcm"