missing const keywords in cOsd
Commit Message
Hi,
attached is a small patch that adds some missing const keywords in cOsd
class to be able to use Data and GetColor methods on const objects. The
patch is against vdr-1.6.0-1 but should apply cleanly against 1.7.3, too.
Regards
Andreas
@@ -635,7 +635,7 @@
}
}
-const tIndex *cBitmap::Data(int x, int y)
+const tIndex *cBitmap::Data(int x, int y) const
{
return &bitmap[y * width + x];
}
@@ -231,9 +231,9 @@
///< 5: vertical, rising, upper
///< 6: vertical, falling, lower
///< 7: vertical, falling, upper
- const tIndex *Data(int x, int y);
+ const tIndex *Data(int x, int y) const;
///< Returns the address of the index byte at the given coordinates.
- tColor GetColor(int x, int y) { return Color(*Data(x, y)); }
+ tColor GetColor(int x, int y) const { return Color(*Data(x, y)); }
///< Returns the color at the given coordinates.
void ReduceBpp(const cPalette &Palette);
///< Reduces the color depth of the bitmap to that of the given Palette.