Skip to content

Commit b109573

Browse files
authored
Merge pull request #5835 from InsightSoftwareConsortium/apply-clang-tidy-int-rules
STYLE: remove redundant control flow Fixed commit message before merging.
2 parents 9080f4e + 18d4d48 commit b109573

11 files changed

Lines changed: 5 additions & 42 deletions

File tree

Modules/Core/Common/src/itkObject.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ Object::SubjectImplementation::InvokeEventRecursion(const EventObject &
209209

210210
++i;
211211
}
212-
213-
return;
214212
}
215213

216214
Command *

Modules/Core/Mesh/include/itkMesh.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ Mesh<TPixelType, VDimension, TMeshTraits>::CreateCell(int cellType, CellAutoPoin
173173
default:
174174
itkExceptionStringMacro("Unknown mesh cell");
175175
}
176-
177-
return;
178176
}
179177

180178
template <typename TPixelType, unsigned int VDimension, typename TMeshTraits>

Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase
236236
this->ComputeMatrixParameters();
237237
m_MatrixMTime.Modified();
238238
this->Modified();
239-
return;
240239
}
241240

242241
/** Get matrix of an MatrixOffsetTransformBase
@@ -266,7 +265,6 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase
266265
m_Offset = offset;
267266
this->ComputeTranslation();
268267
this->Modified();
269-
return;
270268
}
271269

272270
/** Get offset of an MatrixOffsetTransformBase
@@ -308,7 +306,6 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase
308306
m_Center = center;
309307
this->ComputeOffset();
310308
this->Modified();
311-
return;
312309
}
313310

314311
/** Get center of rotation of the MatrixOffsetTransformBase
@@ -335,7 +332,6 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase
335332
m_Translation = translation;
336333
this->ComputeOffset();
337334
this->Modified();
338-
return;
339335
}
340336

341337
/** Get translation component of the MatrixOffsetTransformBase

Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : public Transform<TParame
148148
SetOffset(const OffsetType & offset)
149149
{
150150
m_Offset = offset;
151-
return;
152151
}
153152

154153
/** This method sets the rotation of an Rigid3DPerspectiveTransform to a

Modules/Core/Transform/include/itkTranslationTransform.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : public Transform<TParametersVal
124124
SetOffset(const OutputVectorType & offset)
125125
{
126126
m_Offset = offset;
127-
return;
128127
}
129128

130129
/** Compose with another TranslationTransform. */

Modules/Filtering/ImageGrid/include/itkSliceImageFilter.hxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ SliceImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion()
211211
}
212212

213213
inputPtr->SetRequestedRegion(inputRequestedRegion);
214-
return;
215214
}
216215

217216

Modules/IO/Bruker/include/itkBruker2dseqImageIO.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,12 @@ class ITKIOBruker_EXPORT Bruker2dseqImageIO : public ImageIOBase
117117
/** Not implemented. */
118118
void
119119
WriteImageInformation() override
120-
{
121-
return;
122-
}
120+
{}
123121

124122
/** Not implemented - does nothing */
125123
void
126124
Write(const void * itkNotUsed(buffer)) override
127-
{
128-
return;
129-
}
125+
{}
130126

131127
protected:
132128
Bruker2dseqImageIO();

Modules/IO/MeshVTK/include/itkVTKPolyDataMeshIO.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
190190
EncapsulateMetaData<unsigned int>(metaDic, "numberOfLineIndices", numberOfLineIndices);
191191
EncapsulateMetaData<unsigned int>(metaDic, "numberOfPolygons", numberOfPolygons);
192192
EncapsulateMetaData<unsigned int>(metaDic, "numberOfPolygonIndices", numberOfPolygonIndices);
193-
return;
194193
}
195194

196195
template <typename T>
@@ -441,8 +440,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
441440

442441
outputFile << ConvertNumberToString(buffer[ii * this->m_PointDimension + this->m_PointDimension - 1]) << '\n';
443442
}
444-
445-
return;
446443
}
447444

448445
template <typename T>
@@ -454,8 +451,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
454451
itk::ByteSwapper<T>::SwapWriteRangeFromSystemToBigEndian(
455452
buffer, this->m_NumberOfPoints * this->m_PointDimension, &outputFile);
456453
outputFile << '\n';
457-
458-
return;
459454
}
460455

461456
template <typename T>
@@ -800,8 +795,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
800795
outputFile << ConvertNumberToString(buffer[ii * this->m_NumberOfPointPixelComponents + jj]) << '\n';
801796
}
802797
}
803-
804-
return;
805798
}
806799

807800
template <typename T>
@@ -864,7 +857,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
864857
itk::ByteSwapper<T>::SwapWriteRangeFromSystemToBigEndian(
865858
buffer, this->m_NumberOfPointPixels * this->m_NumberOfPointPixelComponents, &outputFile);
866859
outputFile << '\n';
867-
return;
868860
}
869861

870862
template <typename T>
@@ -990,8 +982,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
990982
outputFile << buffer[ii * this->m_NumberOfCellPixelComponents + jj] << '\n';
991983
}
992984
}
993-
994-
return;
995985
}
996986

997987
template <typename T>
@@ -1054,7 +1044,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
10541044
itk::ByteSwapper<T>::SwapWriteRangeFromSystemToBigEndian(
10551045
buffer, this->m_NumberOfCells * this->m_NumberOfCellPixelComponents, &outputFile);
10561046
outputFile << '\n';
1057-
return;
10581047
}
10591048

10601049
template <typename T>
@@ -1075,8 +1064,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
10751064

10761065
outputFile << '\n';
10771066
}
1078-
1079-
return;
10801067
}
10811068

10821069
template <typename T>
@@ -1096,7 +1083,6 @@ class ITKIOMeshVTK_EXPORT VTKPolyDataMeshIO : public MeshIOBase
10961083

10971084
outputFile.write(reinterpret_cast<char *>(data.get()), numberOfElements);
10981085
outputFile << '\n';
1099-
return;
11001086
}
11011087

11021088
/** Convert cells buffer for output cells buffer, it's user's responsibility to make sure

Modules/IO/RAW/include/itkRawImageIO.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ class ITK_TEMPLATE_EXPORT RawImageIO : public ImageIOBase
116116
* user of the class. */
117117
void
118118
ReadImageInformation() override
119-
{
120-
return;
121-
}
119+
{}
122120

123121
/** Reads the data from disk into the memory buffer provided. */
124122
void
@@ -154,9 +152,7 @@ class ITK_TEMPLATE_EXPORT RawImageIO : public ImageIOBase
154152
/** Binary files have no image information to read. */
155153
void
156154
WriteImageInformation() override
157-
{
158-
return;
159-
}
155+
{}
160156

161157
/** Writes the data to disk from the memory buffer provided. */
162158
void

Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,6 @@ LandmarkBasedTransformInitializer<TTransform, TFixedImage, TMovingImage>::Create
804804
N[1][2] = N[2][1] = M[0][1] + M[1][0];
805805
N[1][3] = N[3][1] = M[2][0] + M[0][2];
806806
N[2][3] = N[3][2] = M[1][2] + M[2][1];
807-
808-
return;
809807
}
810808

811809
template <typename TTransform, typename TFixedImage, typename TMovingImage>

0 commit comments

Comments
 (0)