Some changes to make CppCheck happier.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
CapsFloodCheck::CapsFloodCheck()
|
CapsFloodCheck::CapsFloodCheck()
|
||||||
|
: capsNumberToTrigger(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ CleanerConfig::~CleanerConfig()
|
|||||||
|
|
||||||
void CleanerConfig::fillBuffer() {
|
void CleanerConfig::fillBuffer() {
|
||||||
|
|
||||||
size_t i;
|
|
||||||
string tempString1("");
|
string tempString1("");
|
||||||
string tempString2("");
|
string tempString2("");
|
||||||
|
|
||||||
@@ -222,7 +221,7 @@ void CleanerConfig::fillBuffer() {
|
|||||||
if(doc.LoadFile()) {
|
if(doc.LoadFile()) {
|
||||||
TiXmlHandle docHandle( &doc );
|
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();
|
TiXmlElement* conf = docHandle.FirstChild( "PokerTHCleaner" ).FirstChild( "Configuration" ).FirstChild( configList[i].name ).ToElement();
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
|
|
||||||
~CleanerConfig();
|
~CleanerConfig();
|
||||||
|
|
||||||
std::string getConfigFileName() { return configFileName; }
|
std::string getConfigFileName() const { return configFileName; }
|
||||||
|
|
||||||
void fillBuffer();
|
void fillBuffer();
|
||||||
void writeBuffer() const;
|
void writeBuffer() const;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
LetterRepeatingCheck::LetterRepeatingCheck()
|
LetterRepeatingCheck::LetterRepeatingCheck()
|
||||||
|
: letterNumberToTrigger(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ QStringList MessageFilter::check(unsigned playerId, QString nick, QString msg)
|
|||||||
QString returnAction;
|
QString returnAction;
|
||||||
|
|
||||||
OffenceType offence = NONE;
|
OffenceType offence = NONE;
|
||||||
ActionType action = NOTHING;
|
|
||||||
|
|
||||||
if(myBadWordCheck->run(msg)) offence = BAD_WORD;
|
if(myBadWordCheck->run(msg)) offence = BAD_WORD;
|
||||||
if(myCapsFloodCheck->run(msg)) offence = CAPS_FLOOD;
|
if(myCapsFloodCheck->run(msg)) offence = CAPS_FLOOD;
|
||||||
@@ -65,7 +64,8 @@ QStringList MessageFilter::check(unsigned playerId, QString nick, QString msg)
|
|||||||
|
|
||||||
if(offence){
|
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()) {
|
if(i == myClientWarnLevelList.end()) {
|
||||||
ClientWarnInfos tmpInfos;
|
ClientWarnInfos tmpInfos;
|
||||||
|
|||||||
@@ -340,8 +340,7 @@ void ConfigFile::fillBuffer() {
|
|||||||
|
|
||||||
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
string tempString1("");
|
||||||
string tempString1("");
|
|
||||||
string tempString2("");
|
string tempString2("");
|
||||||
|
|
||||||
TiXmlDocument doc(configFileName);
|
TiXmlDocument doc(configFileName);
|
||||||
@@ -349,7 +348,7 @@ void ConfigFile::fillBuffer() {
|
|||||||
if(doc.LoadFile()) {
|
if(doc.LoadFile()) {
|
||||||
TiXmlHandle docHandle( &doc );
|
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();
|
TiXmlElement* conf = docHandle.FirstChild( "PokerTH" ).FirstChild( "Configuration" ).FirstChild( configList[i].name ).ToElement();
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ private:
|
|||||||
int startCash;
|
int startCash;
|
||||||
int startSmallBlind;
|
int startSmallBlind;
|
||||||
int myGameID;
|
int myGameID;
|
||||||
int guiPlayerNum;
|
|
||||||
|
|
||||||
// running variables
|
// running variables
|
||||||
int currentSmallBlind;
|
int currentSmallBlind;
|
||||||
|
|||||||
+2
-1
@@ -69,7 +69,8 @@ struct GameData
|
|||||||
firstSmallBlind(0), raiseIntervalMode(RAISE_ON_HANDNUMBER),
|
firstSmallBlind(0), raiseIntervalMode(RAISE_ON_HANDNUMBER),
|
||||||
raiseSmallBlindEveryHandsValue(8), raiseSmallBlindEveryMinutesValue(1),
|
raiseSmallBlindEveryHandsValue(8), raiseSmallBlindEveryMinutesValue(1),
|
||||||
raiseMode(DOUBLE_BLINDS), afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS),
|
raiseMode(DOUBLE_BLINDS), afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS),
|
||||||
afterMBAlwaysRaiseValue(0), guiSpeed(4), playerActionTimeoutSec(20) {}
|
afterMBAlwaysRaiseValue(0), guiSpeed(4), delayBetweenHandsSec(6),
|
||||||
|
playerActionTimeoutSec(20) {}
|
||||||
GameType gameType;
|
GameType gameType;
|
||||||
int maxNumberOfPlayers;
|
int maxNumberOfPlayers;
|
||||||
int startMoney;
|
int startMoney;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ using namespace std;
|
|||||||
|
|
||||||
struct IrcContext
|
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;
|
IrcThread &ircThread;
|
||||||
irc_session_t *session;
|
irc_session_t *session;
|
||||||
string serverAddress;
|
string serverAddress;
|
||||||
|
|||||||
Reference in New Issue
Block a user