mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
CThemes: make saveFile and readFile accept const char* param
this removes the need for ugly (char *) casts
This commit is contained in:
committed by
Jacek Jendrzej
parent
63d8c8e90b
commit
3fa68cae90
@@ -82,10 +82,10 @@ int CThemes::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
if ( strstr(themeFile.c_str(), "{U}") != 0 )
|
||||
{
|
||||
themeFile.erase(0, 3);
|
||||
readFile((char*)((std::string)THEMEDIR_VAR + themeFile + FILE_PREFIX).c_str());
|
||||
readFile(((std::string)THEMEDIR_VAR + themeFile + FILE_PREFIX).c_str());
|
||||
}
|
||||
else
|
||||
readFile((char*)((std::string)THEMEDIR + themeFile + FILE_PREFIX).c_str());
|
||||
readFile(((std::string)THEMEDIR + themeFile + FILE_PREFIX).c_str());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ int CThemes::Show()
|
||||
int res = themes.exec(NULL, "");
|
||||
|
||||
if (!file_name.empty()) {
|
||||
saveFile((char*)((std::string)THEMEDIR_VAR + file_name + FILE_PREFIX).c_str());
|
||||
saveFile(((std::string)THEMEDIR_VAR + file_name + FILE_PREFIX).c_str());
|
||||
}
|
||||
|
||||
if (hasThemeChanged) {
|
||||
@@ -203,7 +203,7 @@ void CThemes::rememberOldTheme(bool remember)
|
||||
}
|
||||
}
|
||||
|
||||
void CThemes::readFile(char* themename)
|
||||
void CThemes::readFile(const char *themename)
|
||||
{
|
||||
if(themefile.loadConfig(themename))
|
||||
{
|
||||
@@ -218,7 +218,7 @@ void CThemes::readFile(char* themename)
|
||||
printf("[neutrino theme] %s not found\n", themename);
|
||||
}
|
||||
|
||||
void CThemes::saveFile(char * themename)
|
||||
void CThemes::saveFile(const char *themename)
|
||||
{
|
||||
setTheme(themefile);
|
||||
|
||||
|
Reference in New Issue
Block a user