Commit 4ed9c229 authored by Sean McBride's avatar Sean McBride

Removed a bunch of useless return statements at end of methods

Found and auto-fixed by clang-tidy’s readability-redundant-control-flow check.

Though I did have to manualy fix whitespace after it.
parent 55d265de
......@@ -153,7 +153,6 @@ vtkIdType vtkChart::GetNumberOfAxes()
//-----------------------------------------------------------------------------
void vtkChart::RecalculateBounds()
{
return;
}
//-----------------------------------------------------------------------------
......
......@@ -413,7 +413,6 @@ void vtkChartParallelCoordinates::CalculatePlotTransform()
//-----------------------------------------------------------------------------
void vtkChartParallelCoordinates::RecalculateBounds()
{
return;
}
//-----------------------------------------------------------------------------
......
......@@ -146,7 +146,6 @@ void vtkColorTransferFunctionItem::ComputeTexture()
}
}
delete [] values;
return;
}
//-----------------------------------------------------------------------------
......
......@@ -144,5 +144,4 @@ void vtkCompositeTransferFunctionItem::ComputeTexture()
}
}
delete [] values;
return;
}
......@@ -129,5 +129,4 @@ void vtkLookupTableItem::ComputeTexture()
ptr+=4;
}
}
return;
}
......@@ -146,5 +146,4 @@ void vtkPiecewiseFunctionItem::ComputeTexture()
}
}
delete[] values;
return;
}
......@@ -1013,7 +1013,6 @@ void vtkPlotBar::SelectColorArray(const vtkStdString& arrayName)
vtkDebugMacro(<< "SelectColorArray called with invalid column name.");
this->ColorArrayName = "";
this->Modified();
return;
}
//-----------------------------------------------------------------------------
......
......@@ -479,7 +479,6 @@ void vtkPlotParallelCoordinates::SelectColorArray(const vtkStdString &arrayName)
vtkDebugMacro(<< "SelectColorArray called with invalid column name.");
this->ColorArrayName = "";
this->Modified();
return;
}
//-----------------------------------------------------------------------------
......
......@@ -996,7 +996,6 @@ void vtkPlotPoints::SelectColorArray(const vtkStdString& arrayName)
vtkDebugMacro(<< "SelectColorArray called with invalid column name.");
this->ColorArrayName = "";
this->Modified();
return;
}
//-----------------------------------------------------------------------------
......
......@@ -697,8 +697,6 @@ void vtkLookupTable::GetColorAsUnsignedChars(const double colorIn[4],
else if (v > 1.0) { v = 1.0; }
colorOut[c] = static_cast<unsigned char>( v * 255.0 + 0.5 );
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -125,7 +125,6 @@ void DrawTriangles(double* p1, double* q1, double* r1,
// Render and interact
renderWindow->Render();
renderWindowInteractor->Start();
return;
}
}
......
......@@ -1020,8 +1020,6 @@ void vtkCellLocator::GetBucketNeighbors(int ijk[3], int ndivs, int level)
}
}
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -205,7 +205,6 @@ void vtkCellTypes::InsertCell(int cellId, unsigned char type, int loc)
{
this->MaxId = cellId;
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -324,7 +324,6 @@ void vtkDataObject::RemoveNamedFieldInformation(vtkInformation *info,
return;
}
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -3226,7 +3226,6 @@ void vtkHyperOctreeLightWeightCursor::ToChild(int child)
this->IsLeaf=node->IsChildLeaf(child);
this->Level += 1;
}
return;
}
......
......@@ -680,8 +680,6 @@ void vtkImageData::GetPoint(vtkIdType ptId, double x[3])
{
x[i] = origin[i] + (loc[i]+extent[i*2]) * spacing[i];
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -294,8 +294,6 @@ void vtkKdTree::DeleteCellLists()
}
this->InitializeCellLists();
return;
}
//----------------------------------------------------------------------------
......@@ -552,8 +550,6 @@ void vtkKdTree::GetRegionsAtLevel(int level, vtkKdNode **nodes)
}
vtkKdTree::_GetRegionsAtLevel(level, nodes, this->Top);
return;
}
//----------------------------------------------------------------------------
......@@ -570,7 +566,6 @@ void vtkKdTree::GetLeafNodeIds(vtkKdNode *node, vtkIntArray *ids)
{
ids->InsertNextValue(id);
}
return;
}
//----------------------------------------------------------------------------
......@@ -730,8 +725,6 @@ void vtkKdTree::ComputeCellCenter(vtkDataSet *set, int cellId, double *center)
this->ComputeCellCenter(set->GetCell(cellId), center, weights);
delete [] weights;
return;
}
//----------------------------------------------------------------------------
......@@ -743,8 +736,6 @@ void vtkKdTree::ComputeCellCenter(vtkCell *cell, double *center,
int subId = cell->GetParametricCenter(pcoords);
cell->EvaluateLocation(subId, pcoords, center, weights);
return;
}
//----------------------------------------------------------------------------
......@@ -917,7 +908,6 @@ void vtkKdTree::BuildLocator()
this->SetCalculator(this->Top);
this->UpdateProgress(1.0);
return;
}
int vtkKdTree::ProcessUserDefinedCuts(double *minBounds)
......@@ -1610,8 +1600,6 @@ void vtkKdTree::SelfRegister(vtkKdNode *kd)
this->SelfRegister(kd->GetLeft());
this->SelfRegister(kd->GetRight());
}
return;
}
//----------------------------------------------------------------------------
......@@ -3553,14 +3541,12 @@ int vtkKdTree::findRegion(vtkKdNode *node, double x, double y, double z)
void vtkKdTree::CreateCellLists()
{
this->CreateCellLists(static_cast<int *>(NULL), 0);
return;
}
//----------------------------------------------------------------------------
void vtkKdTree::CreateCellLists(int *regionList, int listSize)
{
this->CreateCellLists(this->GetDataSet(), regionList, listSize);
return;
}
//----------------------------------------------------------------------------
......@@ -3574,7 +3560,6 @@ void vtkKdTree::CreateCellLists(int dataSetIndex, int *regionList, int listSize)
}
this->CreateCellLists(dataSet, regionList, listSize);
return;
}
//----------------------------------------------------------------------------
......
......@@ -353,8 +353,6 @@ void vtkComputeMVCWeightsForPolygonMesh(double x[3], T *pts, vtkIdType npts,
{
weights[pid] /= sumWeight;
}
return;
}
//----------------------------------------------------------------------------
......@@ -534,8 +532,6 @@ void vtkComputeMVCWeightsForTriangleMesh(double x[3], T *pts, vtkIdType npts,
{
weights[pid] /= sumWeight;
}
return;
}
//----------------------------------------------------------------------------
......@@ -609,8 +605,6 @@ void vtkMeanValueCoordinatesInterpolator::ComputeInterpolationWeights(
vtkMeanValueCoordinatesInterpolator::
ComputeInterpolationWeightsForPolygonMesh(x,pts,iter,weights);
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -547,8 +547,6 @@ void vtkPlanesIntersection::ComputeNormal(double *p1, double *p2, double *p3,
v2[0] = p3[0] - p2[0]; v2[1] = p3[1] - p2[1]; v2[2] = p3[2] - p2[2];
vtkMath::Cross(v1, v2, normal);
return;
}
int vtkPlanesIntersection::GoodNormal(double *n)
{
......
......@@ -1008,8 +1008,6 @@ void vtkPointLocator::GetBucketNeighbors(vtkNeighborPoints* buckets,
}
}
}
return;
}
......
......@@ -560,8 +560,6 @@ void vtkPolygon::InterpolateFunctionsUsingMVC(double x[3], double *weights)
{
weights[i] /= sum;
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -219,7 +219,6 @@ void vtkQuadratureSchemeDefinition::PrintSelf(ostream &sout, vtkIndent indent)
}
sout << ")" << endl;
}
return;
}
......
......@@ -250,8 +250,6 @@ GetBucketNeighbors(NeighborBuckets* buckets, const int ijk[3],
}
}
}
return;
}
//-----------------------------------------------------------------------------
......
......@@ -357,8 +357,6 @@ void vtkStructuredData::GetPointCells(vtkIdType ptId, vtkIdList *cellIds,
cellIds->InsertNextId(cellId);
}
}
return;
}
//------------------------------------------------------------------------------
......
......@@ -1698,8 +1698,6 @@ ExtractCellIds(const unsigned char *selected, vtkIdList *cellIds,
}
}
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -283,8 +283,6 @@ void vtkQuaternionInterpolator::InterpolateQuaternion(double t,
q = qc.Slerp(2.0*T*(1.0-T),qd);
q.NormalizeWithAngleInDegrees();
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -2283,8 +2283,6 @@ void vtkFunctionParser::CheckExpression(int &pos, char **error)
// The string is ok
delete [] expectCommaOnParenthesisCount;
delete [] expectTwoCommasOnParenthesisCount;
return;
}
//-----------------------------------------------------------------------------
......
......@@ -113,7 +113,6 @@ void vtkPolygonBuilder::InsertTriangle(vtkIdType* abc)
}
}
}
return;
}
void vtkPolygonBuilder::GetPolygons(vtkIdListCollection* polys)
......
......@@ -145,8 +145,6 @@ void vtkBlueObeliskDataParser::StartElement(const char *name,
{
vtkDebugMacro(<<"Unhandled BODR element: " << name);
}
return;
}
//----------------------------------------------------------------------------
......@@ -453,7 +451,6 @@ void vtkBlueObeliskDataParser::SetCurrentValue(const char *data)
default:
vtkDebugMacro(<<"Called with no CurrentValueType. data: "<<data);
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -179,8 +179,6 @@ void vtkCMLParser::StartElement(const char *name, const char **attr)
}
vtkDebugMacro(<<desc);
}
return;
}
void vtkCMLParser::EndElement(const char *)
......
......@@ -91,8 +91,6 @@ void vtkProgrammableElectronicData::SetNumberOfMOs(vtkIdType size)
this->MOs->resize(size);
this->Modified();
return;
}
//----------------------------------------------------------------------------
......
......@@ -520,8 +520,6 @@ void vtkConnectivityFilter::TraverseAndMark (vtkDataSet *input)
this->Wave2 = tmpWave;
tmpWave->Reset();
} //while wave is not empty
return;
}
// Obtain the number of connected regions.
......
......@@ -1097,8 +1097,6 @@ void vtkDecimatePro::SplitVertex(vtkIdType ptId, int type,
cellIds->Delete();
group->Delete();
}
return;
}
......
......@@ -278,8 +278,6 @@ void vtkHull::SetPlanes( vtkPlanes *planes )
}//for all planes
}//if points and normals
}//if planes defined
return;
}
// Add the six planes that represent the faces on a cube
......
......@@ -505,8 +505,6 @@ void vtkPolyDataConnectivityFilter::TraverseAndMark ()
this->Wave2.clear();
this->Wave2.reserve(numCells);
} //while wave is not empty
return;
}
// --------------------------------------------------------------------------
......
......@@ -593,8 +593,6 @@ void vtkPolyDataNormals::TraverseAndOrder (void)
this->Wave2 = tmpWave;
this->Wave2->Reset();
} //while wave still propagating
return;
}
//
......@@ -754,8 +752,6 @@ void vtkPolyDataNormals::MarkAndSplit (vtkIdType ptId)
}//replace ptId with split point
}//if not in first regions and requiring splitting
}//for all cells connected to ptId
return;
}
void vtkPolyDataNormals::PrintSelf(ostream& os, vtkIndent indent)
......
......@@ -819,7 +819,6 @@ void vtkQuadricDecimation::UpdateEdgeData(vtkIdType pt0Id, vtkIdType pt1Id)
}
changedEdges->Delete();
return;
}
//----------------------------------------------------------------------------
......
......@@ -91,8 +91,6 @@ void vtkExtractCells::AddCellList(vtkIdList *l)
}
this->Modified();
return;
}
//----------------------------------------------------------------------------
......@@ -106,8 +104,6 @@ void vtkExtractCells::AddCellRange(vtkIdType from, vtkIdType to)
}
this->Modified();
return;
}
//----------------------------------------------------------------------------
......@@ -267,8 +263,6 @@ void vtkExtractCells::Copy(vtkDataSet *input, vtkUnstructuredGrid *output)
cellPoints->Delete();
output->Squeeze();
return;
}
//----------------------------------------------------------------------------
......@@ -468,8 +462,6 @@ void vtkExtractCells::CopyCellsDataSet(vtkIdList *ptMap, vtkDataSet *input,
}
cellPoints->Delete();
return;
}
//----------------------------------------------------------------------------
......@@ -562,8 +554,6 @@ void vtkExtractCells::CopyCellsUnstructuredGrid(vtkIdList *ptMap,
locationArray->Delete();
newcells->Delete();
cellArray->Delete();
return;
}
//----------------------------------------------------------------------------
......
......@@ -1199,7 +1199,6 @@ void vtkStreamTracer::Integrate(vtkPointData *input0Data,
delete[] weights;
output->Squeeze();
return;
}
void vtkStreamTracer::GenerateNormals(vtkPolyData* output, double* firstNormal,
......
......@@ -1159,8 +1159,6 @@ void vtkExtractSelectedFrustum::PlaneClipEdge(double *V0, double *V1, int pid,
overts[noverts*3+2] = V1[2];
noverts++;
}
return;
}
//----------------------------------------------------------------------------
......
......@@ -562,8 +562,6 @@ void vtkMergeCells::StartUGrid(vtkDataSet *set)
ugrid->GetCellData()->CopyGlobalIdsOn();
}
ugrid->GetCellData()->CopyAllocate(*cellList, this->TotalNumberOfCells);
return;
}
void vtkMergeCells::Finish()
......@@ -581,8 +579,6 @@ void vtkMergeCells::Finish()
}
ugrid->Squeeze();
return;
}
// Use an array of global node ids to map all points to
......
......@@ -1185,7 +1185,6 @@ void vtkGenericStreamTracer::Integrate(
delete[] values;
output->Squeeze();
return;
}
//-----------------------------------------------------------------------------
......
......@@ -155,7 +155,6 @@ void vtkGreedyTerrainDecimation::EstimateOutputSize(const vtkIdType numInputPts,
numPts = numTris/2 + 1;
numPts = (numPts < 4 ? 4 : numPts); //insure enough storage for initial four corner points
return;
}
//----------------------------------------------------------------------
......
......@@ -378,8 +378,6 @@ namespace {
// Update the sorted points array, now clean!
sortedPoints = newSortedPoints;
return;
}
// Classify polyline segments----------------------------------------------
......
......@@ -260,7 +260,6 @@ void vtkPKdTree::AllCheckParameters()
this->SetNumberOfRegionsOrMore(param0[3]);
this->RegionAssignment = param0[4];
}
return;
}
#define BoundsToMinMax(bounds,min,max) \
......@@ -460,7 +459,6 @@ done:
this->UpdateBuildTime();
this->UpdateProgress(1.0);
return;
}
int vtkPKdTree::MultiProcessBuildLocator(double *volBounds)
{
......@@ -584,8 +582,6 @@ void vtkPKdTree::SingleProcessBuildLocator()
{
this->UpdateRegionAssignment();
}
return;
}
typedef struct _vtkNodeInfo{
vtkKdNode *kd;
......@@ -887,7 +883,6 @@ void vtkPKdTree::ExchangeVals(int pos1, int pos2)
this->SetLocalVal(pos2, otherval);
}
return;
}
// Given an array X with element indices ranging from L to R, and
......@@ -1101,8 +1096,6 @@ void vtkPKdTree::SetLocalVal(int pos, float *val)
this->CurrentPtArray[localOffset] = val[0];
this->CurrentPtArray[localOffset+1] = val[1];
this->CurrentPtArray[localOffset+2] = val[2];
return;
}
void vtkPKdTree::ExchangeLocalVals(int pos1, int pos2)
{
......@@ -1128,8 +1121,6 @@ void vtkPKdTree::ExchangeLocalVals(int pos1, int pos2)
pt2[0] = temp[0];
pt2[1] = temp[1];
pt2[2] = temp[2];
return;
}
void vtkPKdTree::DoTransfer(int from, int to, int fromIndex, int toIndex, int count)
......@@ -2101,8 +2092,6 @@ void vtkPKdTree::ReduceData(vtkKdNode *kd, int *sources)
this->ReduceData(kd->GetLeft(), sources);
this->ReduceData(kd->GetRight(), sources);
return;
}
void vtkPKdTree::BroadcastData(vtkKdNode *kd)
{
......@@ -2125,8 +2114,6 @@ void vtkPKdTree::BroadcastData(vtkKdNode *kd)
this->BroadcastData(kd->GetLeft());
this->BroadcastData(kd->GetRight());
return;
}
void vtkPKdTree::CheckFixRegionBoundaries(vtkKdNode *tree)
{
......
......@@ -373,8 +373,6 @@ void vtkEuclideanClusterExtraction::TraverseAndMark (vtkPoints *inPts)
this->Wave2 = tmpWave;
tmpWave->Reset();
} //while wave is not empty
return;
}
//----------------------------------------------------------------------------
......
......@@ -333,8 +333,6 @@ TraverseAndFlip (vtkPoints *inPts, float *normals, char *pointMap,
} //while wave is not empty
neighborPointIds->Delete();
return;
}
//----------------------------------------------------------------------------
......
......@@ -201,8 +201,6 @@ void vtkCorrelativeStatistics::Aggregate( vtkDataObjectCollection* inMetaColl,
// Clean up
aggregatedTab->Delete();
return;
}
// ----------------------------------------------------------------------
......
......@@ -87,8 +87,6 @@ void vtkOrderStatistics::SetQuantileDefinition( int qd )
this->QuantileDefinition = static_cast<vtkOrderStatistics::QuantileDefinitionType>( qd );
this->Modified();
return;
}
// ----------------------------------------------------------------------
......@@ -306,8 +304,6 @@ void vtkOrderStatistics::Learn( vtkTable* inData,
histogramTab->Delete();
row->Delete();
} // rit
return;
}
// ----------------------------------------------------------------------
......
......@@ -309,8 +309,6 @@ void vtkTextureMapToPlane::ComputeNormal(vtkDataSet *output)
this->Normal[0] = vtkMath::Determinant3x3 (v,c2,c3) / det;
this->Normal[1] = vtkMath::Determinant3x3 (c1,v,c3) / det;
this->Normal[2] = -1.0; // because of the formulation
return;
}
void vtkTextureMapToPlane::PrintSelf(ostream& os, vtkIndent indent)
......
......@@ -284,7 +284,6 @@ void vtkAMREnzoReader::SetFileName( const char* fileName )
this->Modified();
return;
}
//-----------------------------------------------------------------------------
......
......@@ -4293,7 +4293,6 @@ void vtkEnSightGoldBinaryReader::AddTimeStepToCache(const char* fileName,
this->FileOffsets->Map[fileName] = tsMap;
}
this->FileOffsets->Map[fileName][realTimeStep] = address;
return;
}
//----------------------------------------------------------------------------
......@@ -4335,5 +4334,4 @@ void vtkEnSightGoldBinaryReader::AddFileIndexToCache(const char* fileName)
}
}
this->IFile->seekg(0l, ios::beg);
return;
}
......@@ -174,7 +174,6 @@ int vtkCPExodusIIElementBlockImpl::IsHomogeneous()
void vtkCPExodusIIElementBlockImpl::Allocate(vtkIdType, int)
{
vtkErrorMacro("Read only container.")
return;
}
//------------------------------------------------------------------------------
......@@ -203,7 +202,6 @@ vtkIdType vtkCPExodusIIElementBlockImpl::InsertNextCell(
void vtkCPExodusIIElementBlockImpl::ReplaceCell(vtkIdType, int, vtkIdType*)
{
vtkErrorMacro("Read only container.")
return;
}
//------------------------------------------------------------------------------
......
......@@ -254,8 +254,6 @@ void vtkOOGLExporter::WriteALight(vtkLight *aLight, FILE *fp)
VTK_INDENT_LESS;
fprintf(fp, "%s}\n", indent);
return;
}
void vtkOOGLExporter::WriteAnActor(vtkActor *anActor, FILE *fp, int count)
......