diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-06-13 15:33:13 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-06-13 16:57:09 (GMT) |
commit | 790134ceb34ab6047fe204517d263f343dbeb920 (patch) | |
tree | d8002133de67108f380248a0ec7d063c8f1956b7 /Swift/Controllers/Chat | |
parent | a03cedb3942e4c7c90e62fe9a73c6d15e38fbb68 (diff) | |
download | swift-contrib-790134ceb34ab6047fe204517d263f343dbeb920.zip swift-contrib-790134ceb34ab6047fe204517d263f343dbeb920.tar.bz2 |
Added CppCheck script.
Tweaked the sources to satisfy cppcheck.
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/ChatController.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/Chat/ChatsManager.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index a735ed9..513b446 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -143,7 +143,7 @@ void ChatController::handleStanzaAcked(boost::shared_ptr<Stanza> stanza) { void ChatController::setOnline(bool online) { if (!online) { std::map<boost::shared_ptr<Stanza>, std::string>::iterator it = unackedStanzas_.begin(); - for ( ; it != unackedStanzas_.end(); it++) { + for ( ; it != unackedStanzas_.end(); ++it) { chatWindow_->setAckState(it->second, ChatWindow::Failed); } unackedStanzas_.clear(); diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index 0af1a81..ef85107 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp @@ -188,7 +188,7 @@ void ChatsManager::prependRecent(const ChatListWindow::Chat& chat) { void ChatsManager::handleUserLeftMUC(MUCController* mucController) { std::map<JID, MUCController*>::iterator it; - for (it = mucControllers_.begin(); it != mucControllers_.end(); it++) { + for (it = mucControllers_.begin(); it != mucControllers_.end(); ++it) { if ((*it).second == mucController) { mucControllers_.erase(it); delete mucController; diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index e43dc52..ac4689f 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -426,7 +426,7 @@ void MUCController::updateJoinParts() { void MUCController::appendToJoinParts(std::vector<NickJoinPart>& joinParts, const NickJoinPart& newEvent) { std::vector<NickJoinPart>::iterator it = joinParts.begin(); bool matched = false; - for (; it != joinParts.end(); it++) { + for (; it != joinParts.end(); ++it) { if ((*it).nick == newEvent.nick) { matched = true; JoinPart type = (*it).type; diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp index f8fda9a..07afc73 100644 --- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp +++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp @@ -97,7 +97,6 @@ public: //delete chatListWindowFactory_; delete settings_; delete profileSettings_; - delete mocks_; delete avatarManager_; delete manager_; delete directedPresenceSender_; @@ -115,6 +114,7 @@ public: delete entityCapsManager_; delete capsProvider_; delete chatListWindow_; + delete mocks_; } void testFirstOpenWindowIncoming() { |