fix build

Origin commit data
------------------
Branch: ni/coolstream
Commit: df6bc99337
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-02 (Mon, 02 Oct 2017)

Origin message was:
------------------
- fix build

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-10-02 23:55:51 +02:00
parent 463700033b
commit 14f45c39b2
6 changed files with 24 additions and 24 deletions

View File

@@ -382,15 +382,15 @@ void CImageInfoNI::StopInfoThread()
} }
} }
string CImageInfoNI::get_systemRoot() std::string CImageInfoNI::get_systemRoot()
{ {
fstream fh; std::fstream fh;
string s; std::string s;
string root =""; std::string root = "";
const string file = "/proc/cmdline"; const std::string file = "/proc/cmdline";
const string str = "root=mtd:"; const std::string str = "root=mtd:";
fh.open(file.c_str(), ios::in); fh.open(file.c_str(), std::ios::in);
if(!fh.is_open()) if(!fh.is_open())
{ {
@@ -401,8 +401,8 @@ string CImageInfoNI::get_systemRoot()
{ {
getline(fh, s); getline(fh, s);
string::size_type begin = s.find(str) + str.length(); std::string::size_type begin = s.find(str) + str.length();
string::size_type end = s.find(' ', begin); std::string::size_type end = s.find(' ', begin);
root = s.substr(begin, end - begin); root = s.substr(begin, end - begin);
if(!root.empty()) if(!root.empty())
@@ -628,7 +628,7 @@ void CImageInfoNI::paint_DF_Info(int posx)
buf.str(""); buf.str("");
buf.precision(2); buf.precision(2);
buf << fixed; buf << std::fixed;
if (image_size.blocks > 1024) if (image_size.blocks > 1024)
{ {
@@ -729,7 +729,7 @@ void CImageInfoNI::paint_MEM_Info(int posx, int posy)
posy+= sheight; posy+= sheight;
buf.str(""); buf.str("");
buf.precision(2); buf.precision(2);
buf << fixed << "Total: " << (mem_info.total/1024.0) << " MB Used: " << (mem_info.used/1024.0) << " MB"; buf << std::fixed << "Total: " << (mem_info.total/1024.0) << " MB Used: " << (mem_info.used/1024.0) << " MB";
frameBuffer->paintBoxRel(posx, posy - sheight, max_text_width, sheight, COL_INFOBAR_PLUS_0); frameBuffer->paintBoxRel(posx, posy - sheight, max_text_width, sheight, COL_INFOBAR_PLUS_0);
g_Font[font_small]->RenderString(posx, posy, max_text_width, buf.str().c_str(), COL_INFOBAR_TEXT); g_Font[font_small]->RenderString(posx, posy, max_text_width, buf.str().c_str(), COL_INFOBAR_TEXT);
@@ -897,7 +897,7 @@ void CImageInfoNI::paint_NET_Info(int posx, int posy)
write_old = write_akt; write_old = write_akt;
} }
string CImageInfoNI::getYWebVersion() std::string CImageInfoNI::getYWebVersion()
{ {
CConfigFile yV('=', false); CConfigFile yV('=', false);
yV.loadConfig(PRIVATE_HTTPDDIR "/Y_Version.txt"); yV.loadConfig(PRIVATE_HTTPDDIR "/Y_Version.txt");

View File

@@ -247,7 +247,7 @@ std::string CIMDB::googleIMDb(std::string s)
void CIMDB::initMap( std::map<std::string, std::string>& my ) void CIMDB::initMap( std::map<std::string, std::string>& my )
{ {
string errMsg = ""; std::string errMsg = "";
Json::Value root; Json::Value root;
std::ostringstream ss; std::ostringstream ss;

View File

@@ -2573,8 +2573,8 @@ void CInfoViewer::ecmInfoBox_show(const char * txt, int w, int h, Font * font)
//set new window dimensions //set new window dimensions
int h_offset = 5; int h_offset = 5;
int w_offset = 10; int w_offset = 10;
ecmInfoBox->setWidth(min(max_w, w + 2*w_offset)); ecmInfoBox->setWidth(std::min(max_w, w + 2*w_offset));
ecmInfoBox->setHeight(min(max_h, h_header + h + 2*h_offset)); ecmInfoBox->setHeight(std::min(max_h, h_header + h + 2*h_offset));
ecmInfoBox->Refresh(); ecmInfoBox->Refresh();
//calc window position //calc window position

View File

@@ -999,12 +999,12 @@ bool CMoviePlayerGui::getLiveUrl(const std::string &url, const std::string &scri
printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str()); printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
if (!file_exists(_s.c_str())) if (!file_exists(_s.c_str()))
{ {
_s = string(WEBTVDIR_VAR) + "/" + _script; _s = std::string(WEBTVDIR_VAR) + "/" + _script;
printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str()); printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
} }
if (!file_exists(_s.c_str())) if (!file_exists(_s.c_str()))
{ {
_s = string(WEBTVDIR) + "/" + _script; _s = std::string(WEBTVDIR) + "/" + _script;
printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str()); printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
} }
_script = _s; _script = _s;

View File

@@ -61,7 +61,7 @@ CNETFSMountGui::CNETFSMountGui()
autoPath = checkVarPath("/etc/auto.net"); autoPath = checkVarPath("/etc/auto.net");
} }
std::string CNETFSMountGui::checkVarPath(const string &file) std::string CNETFSMountGui::checkVarPath(const std::string &file)
{ {
std::string var = "/var" + file; std::string var = "/var" + file;
if(file_exists(var.c_str())) if(file_exists(var.c_str()))

View File

@@ -96,7 +96,7 @@ int CPluginsHideMenu::menu()
bool CPluginsHideNotifier::changeNotify(const neutrino_locale_t, void * data) bool CPluginsHideNotifier::changeNotify(const neutrino_locale_t, void * data)
{ {
fstream f; std::fstream f;
std::ostringstream os; std::ostringstream os;
std::string line; std::string line;
std::string cfg; std::string cfg;
@@ -104,10 +104,10 @@ bool CPluginsHideNotifier::changeNotify(const neutrino_locale_t, void * data)
printf("CPluginsHideNotifier::changeNotify %s\n",filename); printf("CPluginsHideNotifier::changeNotify %s\n",filename);
os << "hide=" << (((*(int *)data) != 0) ? 1 : 0) << endl; os << "hide=" << (((*(int *)data) != 0) ? 1 : 0) << std::endl;
std::string hide = os.str(); std::string hide = os.str();
f.open(filename, ios::in); f.open(filename, std::ios::in);
while (!f.eof()) while (!f.eof())
{ {
getline(f, line); getline(f, line);
@@ -116,7 +116,7 @@ bool CPluginsHideNotifier::changeNotify(const neutrino_locale_t, void * data)
if (line.substr(0,4) == "hide") if (line.substr(0,4) == "hide")
{ {
cfg += (string) hide; cfg += (std::string) hide;
exist = true; exist = true;
} }
else else
@@ -132,8 +132,8 @@ bool CPluginsHideNotifier::changeNotify(const neutrino_locale_t, void * data)
//printf("%s",cfg.c_str()); //printf("%s",cfg.c_str());
f.open(filename, ios::out); f.open(filename, std::ios::out);
f << cfg << endl; f << cfg << std::endl;
f.close(); f.close();
g_Plugins->loadPlugins(); g_Plugins->loadPlugins();