More cppcheck fixes.

This commit is contained in:
lotodore
2011-02-09 16:25:05 +00:00
parent 024258e41c
commit 49f6c4e757
4 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ bool MyAvatarLabel::playerIsOnIgnoreList(QString playerName) {
list<std::string> playerIgnoreList = myW->getMyConfig()->readConfigStringList("PlayerIgnoreList"); list<std::string> playerIgnoreList = myW->getMyConfig()->readConfigStringList("PlayerIgnoreList");
list<std::string>::iterator it1; list<std::string>::iterator it1;
for(it1= playerIgnoreList.begin(); it1 != playerIgnoreList.end(); it1++) { for(it1= playerIgnoreList.begin(); it1 != playerIgnoreList.end(); ++it1) {
if(playerName == QString::fromUtf8(it1->c_str())) { if(playerName == QString::fromUtf8(it1->c_str())) {
return true; return true;
+1 -1
View File
@@ -24,7 +24,7 @@
#include <assert.h> #include <assert.h>
#include "ui_startwindow.h" #include "ui_startwindow.h"
#include "game_defs.h" #include "game_defs.h"
#include "QMessageBox" #include <QMessageBox>
class GuiInterface; class GuiInterface;
class GuiWrapper; class GuiWrapper;
+1
View File
@@ -34,6 +34,7 @@ ChatCleanerManager::ChatCleanerManager(ChatCleanerCallback &cb, boost::shared_pt
: m_callback(cb), m_ioService(ioService), m_connected(false), m_curRequestId(0), m_serverPort(0), m_useIpv6(false), : m_callback(cb), m_ioService(ioService), m_connected(false), m_curRequestId(0), m_serverPort(0), m_useIpv6(false),
m_recvBufUsed(0) m_recvBufUsed(0)
{ {
m_recvBuf[0] = 0;
m_resolver.reset( m_resolver.reset(
new boost::asio::ip::tcp::resolver(*m_ioService)); new boost::asio::ip::tcp::resolver(*m_ioService));
} }
+1 -1
View File
@@ -28,7 +28,7 @@
struct ReceiveBuffer struct ReceiveBuffer
{ {
ReceiveBuffer() : recvBufUsed(0) {} ReceiveBuffer() : recvBufUsed(0) {recvBuf[0] = 0;}
NetPacketList receivedPackets; NetPacketList receivedPackets;
char recvBuf[RECV_BUF_SIZE]; char recvBuf[RECV_BUF_SIZE];
unsigned recvBufUsed; unsigned recvBufUsed;