[Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-534-ge65d843
Tuxbox Sources
Brought to you by:
dbt1
|
From: GetAway <tux...@ne...> - 2015-04-19 10:14:54
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via e65d843fbb0aaab70a8c51db840bb0198c8b22f5 (commit)
from 54375439063a140a74b6d9aee5854de6750d01d1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e65d843fbb0aaab70a8c51db840bb0198c8b22f5
Author: GetAway <get...@t-...>
Date: Sun Apr 19 12:14:00 2015 +0200
use empty() to check string
Signed-off-by: GetAway <get...@t-...>
diff --git a/misc/libs/libupnpclient/UPNPDevice.cpp b/misc/libs/libupnpclient/UPNPDevice.cpp
index 314d71f..90a85e7 100644
--- a/misc/libs/libupnpclient/UPNPDevice.cpp
+++ b/misc/libs/libupnpclient/UPNPDevice.cpp
@@ -155,7 +155,7 @@ CUPnPDevice::CUPnPDevice(std::string url)
head = result.substr(0,pos);
body = result.substr(pos+4);
- if (body == "")
+ if (body.empty())
throw std::runtime_error(std::string("desc body empty"));
if (!check_response(head, charset, rcode))
diff --git a/misc/libs/libupnpclient/UPNPService.cpp b/misc/libs/libupnpclient/UPNPService.cpp
index 7e845aa..32c15aa 100644
--- a/misc/libs/libupnpclient/UPNPService.cpp
+++ b/misc/libs/libupnpclient/UPNPService.cpp
@@ -69,7 +69,7 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
post << ">";
for (i = attribs.begin(); i != attribs.end(); ++i)
{
- if (i->second == "")
+ if (i->second.empty())
post << "<" << i->first << "/>";
else
{
@@ -157,7 +157,7 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
if (!strcmp(node->GetType(),"faultstring"))
faultstring=std::string(node->GetData()?node->GetData():"");
}
- if (faultstring != "")
+ if (!faultstring.empty())
throw std::runtime_error(faultstring + " " + upnpcode + " " + upnpdesc);
else
throw std::runtime_error(std::string("XML: http error with unknown soap: ")+rcode);
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index 020633e..344b08e 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -229,7 +229,7 @@ void CControlAPI::Execute(CyhookHandler *hh)
}
// send header
- else if(std::string(yCgiCallList[index].mime_type) == "") // decide in function
+ else if(std::string(yCgiCallList[index].mime_type).empty()) // decide in function
;
else if(std::string(yCgiCallList[index].mime_type) == "+xml") // Parameter xml?
if (!hh->ParamList["xml"].empty())
diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
index d2957e9..617f9f1 100644
--- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_mods/mod_yparser.cpp
@@ -139,7 +139,7 @@ void CyParser::Execute(CyhookHandler *hh)
}
// send header
- if(std::string(yCgiCallList[index].mime_type) == "") // set by self
+ if(std::string(yCgiCallList[index].mime_type).empty()) // set by self
;
else if(std::string(yCgiCallList[index].mime_type) == "+xml") // Parameter xml?
if (!hh->ParamList["xml"].empty())
-----------------------------------------------------------------------
Summary of changes:
misc/libs/libupnpclient/UPNPDevice.cpp | 2 +-
misc/libs/libupnpclient/UPNPService.cpp | 4 ++--
.../daemons/nhttpd/tuxboxapi/controlapi.cpp | 2 +-
.../daemons/nhttpd/yhttpd_mods/mod_yparser.cpp | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--
Tuxbox-GIT: apps
|