diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-10 16:46:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-12-10 16:46:55 +0300 |
commit | 608dfae22e1b5145210314ca6c7268420dd639c8 (patch) | |
tree | 5f7317be7e895a1f8aede182ea69ef56d456c54f /src/gui/windows | |
parent | 9eb389060d44672c311a36348036eab297859e7e (diff) | |
download | manaverse-608dfae22e1b5145210314ca6c7268420dd639c8.tar.gz manaverse-608dfae22e1b5145210314ca6c7268420dd639c8.tar.bz2 manaverse-608dfae22e1b5145210314ca6c7268420dd639c8.tar.xz manaverse-608dfae22e1b5145210314ca6c7268420dd639c8.zip |
Fix some issues found by automatic checks.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index d7392acc6..726774cdf 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1107,7 +1107,7 @@ void ChatWindow::addWhisper(const std::string &restrict nick, if (tab->getRemoveNames()) { std::string msg = mes; - const size_t idx = mes.find(":"); + const size_t idx = mes.find(':'); if (idx != std::string::npos && idx > 0) { std::string nick2 = msg.substr(0, idx); @@ -1592,10 +1592,10 @@ bool ChatWindow::resortChatLog(std::string line, if (idx2 != std::string::npos) { std::string tmpNick = line.substr(0, idx2); - if (tmpNick.find("#") != std::string::npos || - tmpNick.find(":") != std::string::npos || - tmpNick.find("%") != std::string::npos || - tmpNick.find("@") != std::string::npos || + if (tmpNick.find('#') != std::string::npos || + tmpNick.find(':') != std::string::npos || + tmpNick.find('%') != std::string::npos || + tmpNick.find('@') != std::string::npos || tmpNick.size() < 5 || tmpNick[0] == '@' || tmpNick[0] == '/' || diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index 38dbb8b92..84193a5d7 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -708,7 +708,7 @@ void NpcDialog::parseListItems(const std::string &itemString) { if (tmp.empty()) continue; - const size_t pos = tmp.find("|"); + const size_t pos = tmp.find('|'); if (pos == std::string::npos) { mItems.push_back(tmp); diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index b3cecc424..091e2c20e 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -224,7 +224,7 @@ void RegisterDialog::action(const ActionEvent &event) error = 2; } else if (mEmailField && - mEmailField->getText().find("@") == std::string::npos) + mEmailField->getText().find('@') == std::string::npos) { // TRANSLATORS: error message errorMsg = _("Incorrect email."); diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 83d54730f..4dc8174cb 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -906,7 +906,7 @@ void ShopWindow::processRequest(const std::string &nick, std::string data, if (!inv) return; - const size_t idx = data.find(" "); + const size_t idx = data.find(' '); if (idx == std::string::npos) return; diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index d970cf8b9..eb4fff376 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -430,7 +430,7 @@ void WhoIsOnline::loadWebList() } trim(lineStr); - pos = lineStr.find("/", 0); + pos = lineStr.find('/', 0); if (pos != std::string::npos) lineStr = lineStr.substr(0, pos); |