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
diff -uN vdr-1.6.0/osd.c vdr-1.6/osd.c
--- vdr-1.6.0/osd.c     2007-10-12 14:38:36.000000000 +0200
+++ vdr-1.6/osd.c       2008-12-29 16:56:09.619517549 +0100
@@ -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];
 }
diff -uN vdr-1.6.0/osd.h vdr-1.6/osd.h
--- vdr-1.6.0/osd.h     2007-10-12 16:28:44.000000000 +0200
+++ vdr-1.6/osd.h       2008-12-29 16:51:06.938850671 +0100
@@ -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.
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to