From patchwork Wed Jan 7 21:38:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Regel X-Patchwork-Id: 12692 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1LKg6w-0000aZ-1e for vdr@linuxtv.org; Wed, 07 Jan 2009 22:38:46 +0100 Received: (qmail invoked by alias); 07 Jan 2009 21:38:12 -0000 Received: from p57AB1E16.dip0.t-ipconnect.de (EHLO [192.168.0.42]) [87.171.30.22] by mail.gmx.net (mp070) with SMTP; 07 Jan 2009 22:38:12 +0100 X-Authenticated: #126152 X-Provags-ID: V01U2FsdGVkX19IUyA6c0JIzz4Z5SLesFyXqxM/2LLm3rI4NKsRdz KehtfP9zx94nL6 Message-ID: <496520C5.8070807@gmx.de> Date: Wed, 07 Jan 2009 22:38:13 +0100 From: Andreas Regel User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Klaus Schmidinger's VDR X-Y-GMX-Trusted: 0 X-FuHaFi: 0.76,0.59 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=AWL=0.000, BAYES_00=-2.599 autolearn=ham Subject: [vdr] missing const keywords in cOsd X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:38:46 -0000 Status: O X-Status: X-Keywords: X-UID: 19083 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.