From ac81f7d707d4da163f847d25d44c97a9150c8a42 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Tue, 10 Feb 2015 14:54:48 +0100 Subject: [PATCH] channellist: remove bogus (char *) casts Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8503bf3bc76f98c1b70ec68329dd91c19580aa57 Author: Stefan Seyfried Date: 2015-02-10 (Tue, 10 Feb 2015) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 624852e92..186ce713b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1309,7 +1309,7 @@ int CChannelList::numericZap(int key) while(1) { if (lastchan != chn) { - snprintf((char*) &valstr, sizeof(valstr), "%d", chn); + snprintf(valstr, sizeof(valstr), "%d", chn); while(strlen(valstr) < maxchansize) strcat(valstr,"-"); //"_" @@ -1873,7 +1873,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) title_offset=6; } - snprintf((char*) tmp, sizeof(tmp), "%d", this->historyMode ? pos : chan->number); + snprintf(tmp, sizeof(tmp), "%d", this->historyMode ? pos : chan->number); CChannelEvent *p_event=NULL; if (displayNext) @@ -1985,7 +1985,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) { struct tm *pStartZeit = localtime(&p_event->startTime); - snprintf((char*) tmp, sizeof(tmp), "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min); + snprintf(tmp, sizeof(tmp), "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x+ 5+ numwidth+ 6, ypos+ xtheight, width- numwidth- 20- 15 -prg_offset, tmp, tcolor); } else @@ -2329,7 +2329,7 @@ void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 std::string aktWord = ""; int aktWidth = 0; text += ' '; - char* text_= (char*) text.c_str(); + const char *text_= text.c_str(); while (*text_!=0) {