mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
use empty() instead of size()
This commit is contained in:
@@ -136,7 +136,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh)
|
||||
void CControlAPI::compatibility_Timer(CyhookHandler *hh)
|
||||
{
|
||||
log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str());
|
||||
if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0)
|
||||
if(NeutrinoAPI->Timerd->isTimerdAvailable() && !hh->ParamList.empty() )
|
||||
{
|
||||
if(hh->ParamList["action"] == "remove")
|
||||
{
|
||||
|
@@ -110,7 +110,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh)
|
||||
void CControlAPI::compatibility_Timer(CyhookHandler *hh)
|
||||
{
|
||||
log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str());
|
||||
if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0)
|
||||
if(NeutrinoAPI->Timerd->isTimerdAvailable() && !hh->ParamList.empty() )
|
||||
{
|
||||
if(hh->ParamList["action"] == "remove")
|
||||
{
|
||||
@@ -353,7 +353,7 @@ void CControlAPI::ExecCGI(CyhookHandler *hh)
|
||||
hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8");
|
||||
else
|
||||
hh->SetHeader(HTTP_OK, "text/plain; charset=UTF-8");
|
||||
if (hh->ParamList.size() > 0)
|
||||
if ( !hh->ParamList.empty() )
|
||||
{
|
||||
script = hh->ParamList["1"];
|
||||
unsigned int len = hh->ParamList.size();
|
||||
|
@@ -159,7 +159,7 @@ void CyParser::cgi(CyhookHandler *hh) {
|
||||
bool ydebug = false;
|
||||
std::string htmlfilename, yresult, ycmd;
|
||||
|
||||
if (hh->ParamList.size() > 0) {
|
||||
if ( !hh->ParamList.empty() ) {
|
||||
if (hh->ParamList["tmpl"] != "") // for GET and POST
|
||||
htmlfilename = hh->ParamList["tmpl"];
|
||||
else
|
||||
|
Reference in New Issue
Block a user