From 2418a9cc78d5479c5e762114b10fbbdfbaf8d923 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 28 Nov 2010 22:00:54 +0000 Subject: [PATCH] fix constness git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@911 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6184b6c1dcb8240751245c37cf4e9daa92d6ecf8 Author: Stefan Seyfried Date: 2010-11-28 (Sun, 28 Nov 2010) Origin message was: ------------------ - fix constness git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@911 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/update.cpp | 7 ++++--- src/system/setting_helpers.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index fb3cbf5e2..61aef9023 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -265,10 +265,11 @@ bool CFlashUpdate::selectHttpImage(void) bool CFlashUpdate::getUpdateImage(const std::string & version) { CHTTPTool httpTool; + char const * fname; char dest_name[100]; httpTool.setStatusViewer(this); - const char *fname = rindex(filename.c_str(), '/'); + fname = rindex(filename.c_str(), '/'); if(fname != NULL) fname++; else return false; @@ -362,7 +363,7 @@ printf("[update] mode is %d\n", g_settings.softupdate_mode); return false; } hide(); - const char *ptr = rindex(filename.c_str(), '.'); + char const * ptr = rindex(filename.c_str(), '.'); if(ptr) { ptr++; if(!strcmp(ptr, "bin")) fileType = 'A'; @@ -408,7 +409,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) if(g_settings.softupdate_mode==1) //internet-update { - const char * fname = rindex(filename.c_str(), '/') +1; + char const * fname = rindex(filename.c_str(), '/') +1; char fullname[255]; if(!getUpdateImage(newVersion)) { diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index bac802953..3a122ca88 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -609,13 +609,13 @@ printf("CSubtitleChangeExec::exec: action %s\n", actionKey.c_str()); return menu_return::RETURN_EXIT; } if(!strncmp(actionKey.c_str(), "DVB", 3)) { - const char *pidptr = strchr(actionKey.c_str(), ':'); + char const * pidptr = strchr(actionKey.c_str(), ':'); int pid = atoi(pidptr+1); tuxtx_stop_subtitle(); dvbsub_pause(); dvbsub_start(pid); } else { - const char *ptr = strchr(actionKey.c_str(), ':'); + char const * ptr = strchr(actionKey.c_str(), ':'); ptr++; int pid = atoi(ptr); ptr = strchr(ptr, ':');