From dc99e757e969675235b36b1b658d88d17cffa46f Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Tue, 10 Feb 2015 14:58:35 +0100 Subject: [PATCH] infoviewer_bb: remove unnecessary (char *) casts change paint_ca_icons to accept (const char *) to achieve this --- src/gui/infoviewer_bb.cpp | 12 ++++++------ src/gui/infoviewer_bb.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 3d0c26bc2..18aa19bf2 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -672,7 +672,7 @@ void CInfoViewerBB::showBarHdd(int percent) } } -void CInfoViewerBB::paint_ca_icons(int caid, char * icon, int &icon_space_offset) +void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_offset) { char buf[20]; int endx = g_InfoViewer->BoxEndX - 10; @@ -748,8 +748,8 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) } int caids[] = { 0x900, 0xD00, 0xB00, 0x1800, 0x0500, 0x0100, 0x600, 0x2600, 0x4a00, 0x0E00 }; - const char * white = (char *) "white"; - const char * yellow = (char *) "yellow"; + const char *white = "white"; + const char *yellow = "yellow"; int icon_space_offset = 0; if(!g_InfoViewer->chanready) { @@ -759,7 +759,7 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) } else if(g_settings.casystem_display == 0) { for (int i = 0; i < (int)(sizeof(caids)/sizeof(int)); i++) { - paint_ca_icons(caids[i], (char *) white, icon_space_offset); + paint_ca_icons(caids[i], white, icon_space_offset); } } return; @@ -793,9 +793,9 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) break; } if(g_settings.casystem_display == 0) - paint_ca_icons(caids[i], (char *) (found ? yellow : white), icon_space_offset); + paint_ca_icons(caids[i], (found ? yellow : white), icon_space_offset); else if(found) - paint_ca_icons(caids[i], (char *) yellow, icon_space_offset); + paint_ca_icons(caids[i], yellow, icon_space_offset); } } } diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index 831e2d793..5bdd590c9 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -115,7 +115,7 @@ class CInfoViewerBB bool checkBBIcon(const char * const icon, int *w, int *h); void showIcon_DD(void); - void paint_ca_icons(int, char*, int&); + void paint_ca_icons(int, const char*, int&); void paintCA_bar(int,int); void showOne_CAIcon(); void changePB(void);