diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-08 00:07:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-08 00:07:56 +0300 |
commit | b3f70d8d46199524edc590269a73c262899763c7 (patch) | |
tree | af8e20371f2cc825c0b2dbe0c0e5c392a926c46d /src/gui/chatwindow.cpp | |
parent | 3f84fc198131ff706e18c56f612e38ff147b0005 (diff) | |
download | manaverse-b3f70d8d46199524edc590269a73c262899763c7.tar.gz manaverse-b3f70d8d46199524edc590269a73c262899763c7.tar.bz2 manaverse-b3f70d8d46199524edc590269a73c262899763c7.tar.xz manaverse-b3f70d8d46199524edc590269a73c262899763c7.zip |
Replace most iterator to const_iterator.
Some other minor changes.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r-- | src/gui/chatwindow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 784fb812a..0f42fb1b6 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -754,7 +754,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) mChatHistoryIndex --; } - std::list<std::string>::iterator it; + std::list<std::string>::const_iterator it; unsigned int f = 0; for (it = tab->getRows().begin(); it != tab->getRows().end(); ++it, f++) @@ -788,7 +788,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) mChatHistoryIndex = 0; } - std::list<std::string>::iterator it; + std::list<std::string>::const_iterator it; unsigned int f = 0; for (it = tab->getRows().begin(); it != tab->getRows().end(); ++it, f++) @@ -1179,7 +1179,7 @@ void ChatWindow::autoComplete() std::string ChatWindow::autoComplete(std::vector<std::string> &names, std::string partName) const { - std::vector<std::string>::iterator i = names.begin(); + std::vector<std::string>::const_iterator i = names.begin(); toLower(partName); std::string newName(""); @@ -1215,7 +1215,7 @@ std::string ChatWindow::autoComplete(std::string partName, History *words) if (!words) return ""; - Commands::iterator i = words->begin(); + Commands::const_iterator i = words->begin(); std::vector<std::string> nameList; while (i != words->end()) @@ -1243,7 +1243,7 @@ void ChatWindow::moveTabRight(ChatTab *tab) std::string ChatWindow::autoCompleteHistory(std::string partName) { - History::iterator i = mHistory.begin(); + History::const_iterator i = mHistory.begin(); std::vector<std::string> nameList; while (i != mHistory.end()) @@ -1344,7 +1344,7 @@ void ChatWindow::initTradeFilter() void ChatWindow::updateOnline(std::set<std::string> &onlinePlayers) { - TabMap::iterator iter; + TabMap::const_iterator iter; const Party *party = 0; const Guild *guild = 0; if (player_node) @@ -1429,7 +1429,7 @@ void ChatWindow::loadState() void ChatWindow::saveState() { int num = 0; - TabMap::iterator iter; + TabMap::const_iterator iter; for (iter = mWhispers.begin(); iter != mWhispers.end() && num < 50; ++iter) { if (!iter->second) |