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

@@ -412,27 +412,27 @@ int CPersonalizeGui::ShowPersonalizationMenu()
g_settings.plugins_lua = "";
for (int i = 0; i < pcount; i++) {
if (pltype[i] & CPlugins::P_TYPE_DISABLED) {
if (g_settings.plugins_disabled != "")
if (!g_settings.plugins_disabled.empty())
g_settings.plugins_disabled += ",";
g_settings.plugins_disabled += g_PluginList->getFileName(i);
g_PluginList->setType(i, CPlugins::P_TYPE_DISABLED);
} else if (pltype[i] & CPlugins::P_TYPE_GAME) {
if (g_settings.plugins_game != "")
if (!g_settings.plugins_game.empty())
g_settings.plugins_game += ",";
g_settings.plugins_game += g_PluginList->getFileName(i);
g_PluginList->setType(i, CPlugins::P_TYPE_GAME);
} else if (pltype[i] & CPlugins::P_TYPE_TOOL) {
if (g_settings.plugins_tool != "")
if (!g_settings.plugins_tool.empty())
g_settings.plugins_tool += ",";
g_settings.plugins_tool += g_PluginList->getFileName(i);
g_PluginList->setType(i, CPlugins::P_TYPE_TOOL);
} else if (pltype[i] & CPlugins::P_TYPE_SCRIPT) {
if (g_settings.plugins_script != "")
if (!g_settings.plugins_script.empty())
g_settings.plugins_script += ",";
g_settings.plugins_script += g_PluginList->getFileName(i);
g_PluginList->setType(i, CPlugins::P_TYPE_SCRIPT);
} else if (pltype[i] & CPlugins::P_TYPE_LUA) {
if (g_settings.plugins_lua != "")
if (!g_settings.plugins_lua.empty())
g_settings.plugins_lua += ",";
g_settings.plugins_lua += g_PluginList->getFileName(i);
g_PluginList->setType(i, CPlugins::P_TYPE_LUA);