Some changes to make CppCheck happier.

This commit is contained in:
lotodore
2010-10-26 21:32:39 +00:00
parent 74a96a4354
commit 83da8559a4
9 changed files with 11 additions and 11 deletions
+1
View File
@@ -3,6 +3,7 @@
#include <QtCore>
CapsFloodCheck::CapsFloodCheck()
: capsNumberToTrigger(0)
{
}
+1 -2
View File
@@ -213,7 +213,6 @@ CleanerConfig::~CleanerConfig()
void CleanerConfig::fillBuffer() {
size_t i;
string tempString1("");
string tempString2("");
@@ -222,7 +221,7 @@ void CleanerConfig::fillBuffer() {
if(doc.LoadFile()) {
TiXmlHandle docHandle( &doc );
for (i=0; i<configBufferList.size(); i++) {
for (size_t i=0; i<configBufferList.size(); i++) {
TiXmlElement* conf = docHandle.FirstChild( "PokerTHCleaner" ).FirstChild( "Configuration" ).FirstChild( configList[i].name ).ToElement();
+1 -1
View File
@@ -34,7 +34,7 @@ public:
~CleanerConfig();
std::string getConfigFileName() { return configFileName; }
std::string getConfigFileName() const { return configFileName; }
void fillBuffer();
void writeBuffer() const;
+1
View File
@@ -3,6 +3,7 @@
#include <QtCore>
LetterRepeatingCheck::LetterRepeatingCheck()
: letterNumberToTrigger(0)
{
}
+2 -2
View File
@@ -55,7 +55,6 @@ QStringList MessageFilter::check(unsigned playerId, QString nick, QString msg)
QString returnAction;
OffenceType offence = NONE;
ActionType action = NOTHING;
if(myBadWordCheck->run(msg)) offence = BAD_WORD;
if(myCapsFloodCheck->run(msg)) offence = CAPS_FLOOD;
@@ -65,7 +64,8 @@ QStringList MessageFilter::check(unsigned playerId, QString nick, QString msg)
if(offence){
QMap<unsigned, ClientWarnInfos>::const_iterator i = myClientWarnLevelList.find(playerId);
ActionType action = NOTHING;
QMap<unsigned, ClientWarnInfos>::const_iterator i = myClientWarnLevelList.find(playerId);
if(i == myClientWarnLevelList.end()) {
ClientWarnInfos tmpInfos;
+2 -3
View File
@@ -340,8 +340,7 @@ void ConfigFile::fillBuffer() {
boost::recursive_mutex::scoped_lock lock(m_configMutex);
size_t i;
string tempString1("");
string tempString1("");
string tempString2("");
TiXmlDocument doc(configFileName);
@@ -349,7 +348,7 @@ void ConfigFile::fillBuffer() {
if(doc.LoadFile()) {
TiXmlHandle docHandle( &doc );
for (i=0; i<configBufferList.size(); i++) {
for (size_t i=0; i<configBufferList.size(); i++) {
TiXmlElement* conf = docHandle.FirstChild( "PokerTH" ).FirstChild( "Configuration" ).FirstChild( configList[i].name ).ToElement();
-1
View File
@@ -97,7 +97,6 @@ private:
int startCash;
int startSmallBlind;
int myGameID;
int guiPlayerNum;
// running variables
int currentSmallBlind;
+2 -1
View File
@@ -69,7 +69,8 @@ struct GameData
firstSmallBlind(0), raiseIntervalMode(RAISE_ON_HANDNUMBER),
raiseSmallBlindEveryHandsValue(8), raiseSmallBlindEveryMinutesValue(1),
raiseMode(DOUBLE_BLINDS), afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS),
afterMBAlwaysRaiseValue(0), guiSpeed(4), playerActionTimeoutSec(20) {}
afterMBAlwaysRaiseValue(0), guiSpeed(4), delayBetweenHandsSec(6),
playerActionTimeoutSec(20) {}
GameType gameType;
int maxNumberOfPlayers;
int startMoney;
+1 -1
View File
@@ -41,7 +41,7 @@ using namespace std;
struct IrcContext
{
IrcContext(IrcThread &t) : ircThread(t), session(NULL), serverPort(0), useIPv6(false), renameTries(0), sendingBlocked(false) {}
IrcContext(IrcThread &t) : ircThread(t), session(NULL), serverPort(0), useIPv6(false), renameTries(0), sendingBlocked(false), sendCounter(0) {}
IrcThread &ircThread;
irc_session_t *session;
string serverAddress;