use empty to check string

Origin commit data
------------------
Commit: 2b5e7b5ba3
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-01-09 (Fri, 09 Jan 2015)
This commit is contained in:
Jacek Jendrzej
2015-01-09 17:15:11 +01:00
parent e510b2eb39
commit 6ff2c1b6bd
34 changed files with 170 additions and 170 deletions

View File

@@ -171,7 +171,7 @@ std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler *, std::string)
yip = Config->getString("network_nfs_ip_"+ynr,"");
ydir = Config->getString("network_nfs_dir_"+ynr,"");
ylocal_dir = Config->getString("network_nfs_local_dir_"+ynr,"");
if(ydir != "")
if(!ydir.empty())
ydir="("+ydir+")";
yresult += string_printf("<input type='radio' name='R1' value='%d' %s />%d %s - %s %s %s<br/>",
@@ -215,7 +215,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *, st
int nr=1;
ySplitString(para," ",nr_str, do_show_hidden);
if(nr_str != "")
if(!nr_str.empty())
nr = atoi(nr_str.c_str());
int mode = NeutrinoAPI->Zapit->getMode();
@@ -286,7 +286,7 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *, st
int mode = NeutrinoAPI->Zapit->getMode();
ySplitString(para," ",abouquet, achannel_id);
if(abouquet != "")
if(!abouquet.empty())
bnumber = atoi(abouquet.c_str());
if(bnumber > 0) {
bnumber--;
@@ -323,7 +323,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
int mode = NeutrinoAPI->Zapit->getMode();
ySplitString(para," ",abnumber, tmp);
if(abnumber != "")
if(!abnumber.empty())
BouquetNr = atoi(abnumber.c_str());
if (BouquetNr > 0) {
BouquetNr--;
@@ -351,7 +351,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
std::string timestr;
bool have_logos = false;
if(hh->WebserverConfigList["Tuxbox.LogosURL"] != "")
if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty())
have_logos = true;
for(int j = 0; j < (int) channels.size(); j++)
{
@@ -526,7 +526,7 @@ std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler *, std::string
int apid=0,apid_no=0,apid_idx=0;
pids.PIDs.vpid=0;
if(para != "")
if(!para.empty())
apid_no = atoi(para.c_str());
NeutrinoAPI->Zapit->getPIDS(pids);
@@ -714,7 +714,7 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str
in >> ymtd >> dummy >> dummy; //format: mtd# start end "name "
in.getline(ytmp, 200); // Rest of line is the mtd description
yname = ytmp;
if((j>0) && (ymtd != ""))// iggnore first line
if((j>0) && (!ymtd.empty()))// iggnore first line
{
ysel = ((j==1) ? "checked=\"checked\"" : "");
yresult += string_printf("<input type='radio' name='R1' value='%d' %s title='%s' />%d %s<br/>",
@@ -976,7 +976,7 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin
if(cmd != "new")
{
// init timerid
if(stimerid != "")
if(!stimerid.empty())
timerId = (unsigned)atoi(stimerid.c_str());
NeutrinoAPI->Timerd->getTimer(timer, timerId);
@@ -1119,7 +1119,7 @@ std::string CNeutrinoYParser::func_bouquet_editor_main(CyhookHandler *hh, std::
if (hh->ParamList["saved"] == "1")
hh->ParamList["have_saved"]="true";
if (hh->ParamList["selected"] != "")
if (!hh->ParamList["selected"].empty())
selected = atoi(hh->ParamList["selected"].c_str());
int bouquetSize = (int) g_bouquetManager->Bouquets.size();