use empty to check string

This commit is contained in:
Jacek Jendrzej
2015-01-09 17:15:11 +01:00
parent aea7e1f772
commit 2b5e7b5ba3
34 changed files with 170 additions and 170 deletions

View File

@@ -99,11 +99,11 @@ int CProxySetup::showProxySetup()
int res = mn->exec(NULL, "");
delete mn;
if (g_settings.softupdate_proxyserver == "")
if (g_settings.softupdate_proxyserver.empty())
unsetenv("http_proxy");
else {
std::string proxy = "http://";
if (g_settings.softupdate_proxyusername != "")
if (!g_settings.softupdate_proxyusername.empty())
proxy += g_settings.softupdate_proxyusername + ":" + g_settings.softupdate_proxypassword + "@";
proxy += g_settings.softupdate_proxyserver;
setenv("http_proxy", proxy.c_str(), 1);