summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-15 21:39:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-15 21:39:03 +0300
commit3133a725a57e275b76cccd0866cab6a00a07d1a6 (patch)
treeb5abce4046623ea08467897d8aea27fe0619b5b5 /src
parent6c3ab80385465cdaf88643fd964706827e2b61d6 (diff)
downloadmanaplus-3133a725a57e275b76cccd0866cab6a00a07d1a6.tar.gz
manaplus-3133a725a57e275b76cccd0866cab6a00a07d1a6.tar.bz2
manaplus-3133a725a57e275b76cccd0866cab6a00a07d1a6.tar.xz
manaplus-3133a725a57e275b76cccd0866cab6a00a07d1a6.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp2
-rw-r--r--src/gui/helpwindow.cpp2
-rw-r--r--src/notifymanager.cpp1
-rw-r--r--src/party.cpp6
-rw-r--r--src/utils/stringutils.cpp4
5 files changed, 8 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp
index b26b56c5d..839999312 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -459,7 +459,7 @@ void Being::setSpeech(const std::string &text, int time)
if (mSpeech.empty())
return;
- const int sz = mSpeech.size();
+ const size_t sz = mSpeech.size();
if (!time && sz < 200)
time = static_cast<int>(SPEECH_TIME - 300 + (3 * sz));
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp
index cacac99d1..eeda8c907 100644
--- a/src/gui/helpwindow.cpp
+++ b/src/gui/helpwindow.cpp
@@ -86,7 +86,7 @@ void HelpWindow::action(const gcn::ActionEvent &event)
{
if (event.getId() == "DYK")
{
- if(didYouKnowWindow)
+ if (didYouKnowWindow)
{
didYouKnowWindow->setVisible(!didYouKnowWindow->isVisible());
if (didYouKnowWindow->isVisible())
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp
index e8c52276a..8f702c286 100644
--- a/src/notifymanager.cpp
+++ b/src/notifymanager.cpp
@@ -132,6 +132,7 @@ namespace NotifyManager
chatLog(tab, strprintf(gettext(info.text), str.c_str()));
break;
}
+ case EMPTY:
case INT:
case GUILD:
case PARTY:
diff --git a/src/party.cpp b/src/party.cpp
index effcd95f1..a013e945b 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -126,7 +126,7 @@ void Party::removeMember(const PartyMember *const member)
const MemberList::iterator itr_end = mMembers.end();
while (itr != itr_end)
{
- const PartyMember *const m = *itr;
+ PartyMember *const m = *itr;
if (m && m->mId == member->mId
&& m->getName() == member->getName())
{
@@ -150,7 +150,7 @@ void Party::removeMember(const int id)
const MemberList::iterator itr_end = mMembers.end();
while (itr != itr_end)
{
- const PartyMember *const member = *itr;
+ PartyMember *const member = *itr;
if (member && member->mId == id)
{
mMembers.erase(itr);
@@ -173,7 +173,7 @@ void Party::removeMember(const std::string &name)
const MemberList::iterator itr_end = mMembers.end();
while (itr != itr_end)
{
- const PartyMember *const member = *itr;
+ PartyMember *const member = *itr;
if (member && member->getName() == name)
{
mMembers.erase(itr);
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 1994cda98..f1fd8d82b 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -206,12 +206,12 @@ size_t findI(std::string str, std::string subStr)
size_t findI(std::string text, StringVect &list)
{
- std::string str = toLower(text);
+ toLower(text);
FOR_EACH (StringVectCIter, i, list)
{
std::string subStr = *i;
subStr = toLower(subStr);
- const size_t idx = str.find(subStr);
+ const size_t idx = text.find(subStr);
if (idx != std::string::npos)
return idx;
}