More cppcheck fixes.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user