From b3f70d8d46199524edc590269a73c262899763c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Sep 2011 00:07:56 +0300 Subject: Replace most iterator to const_iterator. Some other minor changes. --- src/gui/chatwindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/chatwindow.cpp') 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::iterator it; + std::list::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::iterator it; + std::list::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 &names, std::string partName) const { - std::vector::iterator i = names.begin(); + std::vector::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 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 nameList; while (i != mHistory.end()) @@ -1344,7 +1344,7 @@ void ChatWindow::initTradeFilter() void ChatWindow::updateOnline(std::set &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) -- cgit v1.2.3-70-g09d2