diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2009-12-06 12:57:45 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2009-12-06 12:57:45 +0100 |
commit | 6a208294bef44f588e067383aa2e35af1aa23a16 (patch) | |
tree | 463f2aa875c26a6d0df507c2559a9bb821111082 /osd.c | |
parent | 1b973fd8ebb0a5dca7c82fac0651c33ecb7edd50 (diff) | |
download | vdr-6a208294bef44f588e067383aa2e35af1aa23a16.tar.gz vdr-6a208294bef44f588e067383aa2e35af1aa23a16.tar.bz2 |
Several code modifications to avoid compiler warnings
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 2.5 2009/05/09 10:42:35 kls Exp $ + * $Id: osd.c 2.6 2009/12/06 11:33:47 kls Exp $ */ #include "osd.h" @@ -101,6 +101,7 @@ void cPalette::Take(const cPalette &Palette, tIndexes *Indexes, tColor ColorFg, switch (i) { case 0: Color = ColorBg; break; case 1: Color = ColorFg; break; + default: ; } } int n = Index(Color); @@ -532,6 +533,7 @@ void cBitmap::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quad case 6: cy = y2; rx /= 2; break; case 7: cx = x2; ry /= 2; break; case 8: cy = y1; rx /= 2; break; + default: ; } int TwoASquare = 2 * rx * rx; int TwoBSquare = 2 * ry * ry; @@ -557,6 +559,7 @@ void cBitmap::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quad case -2: DrawRectangle(x1, cy - y, cx - x, cy - y, Color); break; case -3: DrawRectangle(x1, cy + y, cx - x, cy + y, Color); break; case -4: DrawRectangle(cx + x, cy + y, x2, cy + y, Color); break; + default: ; } y++; StoppingY += TwoASquare; @@ -591,6 +594,7 @@ void cBitmap::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quad case -2: DrawRectangle(x1, cy - y, cx - x, cy - y, Color); break; case -3: DrawRectangle(x1, cy + y, cx - x, cy + y, Color); break; case -4: DrawRectangle(cx + x, cy + y, x2, cy + y, Color); break; + default: ; } x++; StoppingX += TwoBSquare; @@ -921,7 +925,7 @@ void cOsdProvider::UpdateOsdSize(bool Force) int Height; double Aspect; cDevice::PrimaryDevice()->GetOsdSize(Width, Height, Aspect); - if (Width != oldWidth || Height != oldHeight || Aspect != oldAspect || Force) { + if (Width != oldWidth || Height != oldHeight || !DoubleEqual(Aspect, oldAspect) || Force) { Setup.OSDLeft = int(round(Width * Setup.OSDLeftP)); Setup.OSDTop = int(round(Height * Setup.OSDTopP)); Setup.OSDWidth = int(round(Width * Setup.OSDWidthP)) & ~0x07; // OSD width must be a multiple of 8 |