1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added some missing 'const' statements to cBitmap

This commit is contained in:
Klaus Schmidinger 2009-01-16 14:39:27 +01:00
parent 0c5374ce7d
commit 329d7da4ec
4 changed files with 7 additions and 5 deletions

View File

@ -1315,6 +1315,7 @@ Andreas Regel <andreas.regel@gmx.de>
for implementing palette replace mode in the OSD bitmaps
for fixing handling numeric keys in the channel display after switching channel
groups
for adding some missing 'const' statements to cBitmap
Thomas Bergwinkl <Thomas.Bergwinkl@vr-web.de>
for fixing the validity check for channel IDs, because some providers use TIDs

View File

@ -5924,3 +5924,4 @@ Video Disk Recorder Revision History
is no longer necessary.
- Added a typecast in cUnbufferedFile::Write() to avoid an error message when
compiling on 64 bit systems.
- Added some missing 'const' statements to cBitmap (thanks to Andreas Regel).

4
osd.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.c 1.75 2007/10/12 12:38:36 kls Exp $
* $Id: osd.c 2.1 2009/01/16 14:34:32 kls Exp $
*/
#include "osd.h"
@ -635,7 +635,7 @@ void cBitmap::DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type)
}
}
const tIndex *cBitmap::Data(int x, int y)
const tIndex *cBitmap::Data(int x, int y) const
{
return &bitmap[y * width + x];
}

6
osd.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.h 1.58 2007/10/12 14:28:44 kls Exp $
* $Id: osd.h 2.1 2009/01/16 14:37:03 kls Exp $
*/
#ifndef __OSD_H
@ -231,9 +231,9 @@ public:
///< 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.