aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRendererSpec.cpp
diff options
context:
space:
mode:
authorD G Turner2019-11-17 10:11:25 +0000
committerD G Turner2019-11-17 10:11:25 +0000
commitbe56e9afed697dd580c7348e8a9467281bac3517 (patch)
tree21838ac55e5b55c495d12c03d6d0b13cc6975321 /graphics/VectorRendererSpec.cpp
parentb46f07b823fbde7b7e0aadf1bbf583fb07377332 (diff)
downloadscummvm-rg350-be56e9afed697dd580c7348e8a9467281bac3517.tar.gz
scummvm-rg350-be56e9afed697dd580c7348e8a9467281bac3517.tar.bz2
scummvm-rg350-be56e9afed697dd580c7348e8a9467281bac3517.zip
GRAPHICS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r--graphics/VectorRendererSpec.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index cbd5d78d0d..457e9ff149 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -448,6 +448,7 @@ void colorFill(PixelType *first, PixelType *last, PixelType color) {
return;
int n = (count + 7) >> 3;
switch (count % 8) {
+ default:
case 0: do {
*first++ = color; // fall through
case 7: *first++ = color; // fall through
@@ -488,6 +489,7 @@ void colorFillClip(PixelType *first, PixelType *last, PixelType color, int realX
int n = (count + 7) >> 3;
switch (count % 8) {
+ default:
case 0: do {
*first++ = color; // fall through
case 7: *first++ = color; // fall through
@@ -1205,6 +1207,9 @@ drawCircle(int x, int y, int r) {
case kFillGradient:
break;
+
+ default:
+ break;
}
}
@@ -1263,6 +1268,9 @@ drawSquare(int x, int y, int w, int h) {
drawSquareAlg(x, y, w, h, _fgColor, kFillDisabled);
}
break;
+
+ default:
+ break;
}
}
@@ -1350,6 +1358,9 @@ drawTab(int x, int y, int r, int w, int h) {
else
drawTabAlg(x, y, w, h, r, _fgColor, Base::_fillMode);
break;
+
+ default:
+ break;
}
}
@@ -1392,6 +1403,7 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) {
case kTriangleLeft:
case kTriangleRight:
case kTriangleAuto:
+ default:
break;
}
@@ -1418,6 +1430,7 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) {
case kTriangleLeft:
case kTriangleRight:
case kTriangleAuto:
+ default:
break;
}
@@ -2286,6 +2299,8 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
blendPixelPtr(ptr_right, color, rfpart(intery));
blendPixelPtr(ptr_left, color, rfpart(intery));
break;
+ default:
+ break;
}
}
@@ -2339,6 +2354,8 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
blendPixelPtr(ptr_right, color, rfpart(interx));
blendPixelPtr(ptr_left, color, rfpart(interx));
break;
+ default:
+ break;
}
}
@@ -2382,6 +2399,8 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
blendPixelPtr(ptr_right, color, rfpart(interx));
blendPixelPtr(ptr_left, color, rfpart(interx));
break;
+ default:
+ break;
}
}
@@ -2480,6 +2499,8 @@ drawTriangleVertAlgClip(int x1, int y1, int w, int h, bool inverted, PixelType c
blendPixelPtrClip(ptr_right, color, rfpart(intery), x_right, y_right);
blendPixelPtrClip(ptr_left, color, rfpart(intery), x_left, y_left);
break;
+ default:
+ break;
}
}
@@ -2539,6 +2560,8 @@ drawTriangleVertAlgClip(int x1, int y1, int w, int h, bool inverted, PixelType c
blendPixelPtrClip(ptr_right, color, rfpart(interx), x_right, y_right);
blendPixelPtrClip(ptr_left, color, rfpart(interx), x_left, y_left);
break;
+ default:
+ break;
}
}
@@ -2587,6 +2610,8 @@ drawTriangleVertAlgClip(int x1, int y1, int w, int h, bool inverted, PixelType c
blendPixelPtrClip(ptr_right, color, rfpart(interx), x_right, y_right);
blendPixelPtrClip(ptr_left, color, rfpart(interx), x_left, y_left);
break;
+ default:
+ break;
}
}
}
@@ -2634,6 +2659,8 @@ drawTriangleFast(int x1, int y1, int size, bool inverted, PixelType color, Vecto
case kFillGradient:
colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, size));
break;
+ default:
+ break;
}
if (x1 == x2 && y1 == y2)