From 30dcadfd7c3482695e4f074ccf41c550ef3be327 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal <mathieu.westphal@kitware.com> Date: Wed, 27 Apr 2016 14:21:53 +0200 Subject: [PATCH] Adding default to switch to remove warnings and explicit falltrough --- Rendering/Annotation/vtkAxisActor.cxx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Rendering/Annotation/vtkAxisActor.cxx b/Rendering/Annotation/vtkAxisActor.cxx index 98103274dcb..bf006a3fa00 100644 --- a/Rendering/Annotation/vtkAxisActor.cxx +++ b/Rendering/Annotation/vtkAxisActor.cxx @@ -1203,6 +1203,9 @@ void vtkAxisActor::SetLabelPositions2D(vtkViewport *viewport, bool force) xcoeff = 1.0; ycoeff = 0.5; break; + default: + // shouldn't get here + break; } int ptIdx; @@ -1383,6 +1386,7 @@ void vtkAxisActor::BuildTitle(bool force) { case (VTK_ALIGN_TOP): vertOffsetSign = -1; + VTK_FALLTHROUGH; // NO BREAK case (VTK_ALIGN_BOTTOM): // Position to center of axis @@ -1407,6 +1411,9 @@ void vtkAxisActor::BuildTitle(bool force) } offset[0] += this->ScreenSize * halfTitleWidth + 3; break; + default: + // shouldn't get there + break; } if (this->TickVisibility && @@ -1514,6 +1521,7 @@ void vtkAxisActor::BuildExponent(bool force) { case (VTK_ALIGN_TOP): offsetSign = -1; + VTK_FALLTHROUGH; // NO BREAK case (VTK_ALIGN_BOTTOM): // Position to center of axis @@ -1538,6 +1546,9 @@ void vtkAxisActor::BuildExponent(bool force) } offset[0] += this->ScreenSize * halfExponentWidth + 3; break; + default: + // shouldn't get there + break; } if (this->TickVisibility && @@ -1801,7 +1812,7 @@ void vtkAxisActor::PrintSelf(ostream& os, vtkIndent indent) break; default: // shouldn't get here - ; + break; } os << indent << "DeltaMajor: " @@ -2583,6 +2594,10 @@ bool vtkAxisActor::BuildTickPoints(double p1[3], double p2[3], bool force) memcpy(&coordSystem[1], this->AxisBaseForX, 3*sizeof(double)); memcpy(&coordSystem[2], this->AxisBaseForY, 3*sizeof(double)); break; + + default: + // shouldn't get here + break; } //-----------------------------------------------------------------------------* @@ -2656,6 +2671,9 @@ void vtkAxisActor::BuildAxisGridLines(double p1[3], double p2[3], double localCo vGridLength = this->GridlineYLength; uIndex = 0; vIndex = 1; break; + default: + // shouldn't get here + break; } bool hasOrthogonalVectorBase = -- GitLab