Fix some cppcheck warnings (mostly style and postfix vs prefix iteration)
This commit is contained in:
@@ -24,7 +24,7 @@ AIStats::AIStats(Player * _player, char * _filename)
|
||||
AIStats::~AIStats()
|
||||
{
|
||||
list<AIStat *>::iterator it;
|
||||
for (it = stats.begin(); it != stats.end(); it++)
|
||||
for (it = stats.begin(); it != stats.end(); ++it)
|
||||
{
|
||||
AIStat * stat = *it;
|
||||
delete stat;
|
||||
@@ -115,7 +115,7 @@ bool AIStats::isInTop(MTGCardInstance * card, unsigned int max, bool tooSmallCou
|
||||
MTGCard * source = card->model;
|
||||
int id = source->getMTGId();
|
||||
list<AIStat *>::iterator it;
|
||||
for (it = stats.begin(); it != stats.end(); it++)
|
||||
for (it = stats.begin(); it != stats.end(); ++it)
|
||||
{
|
||||
if (n >= max)
|
||||
return false;
|
||||
@@ -135,7 +135,7 @@ AIStat * AIStats::find(MTGCard * source)
|
||||
{
|
||||
int id = source->getMTGId();
|
||||
list<AIStat *>::iterator it;
|
||||
for (it = stats.begin(); it != stats.end(); it++)
|
||||
for (it = stats.begin(); it != stats.end(); ++it)
|
||||
{
|
||||
AIStat * stat = *it;
|
||||
if (stat->source == id)
|
||||
@@ -174,7 +174,7 @@ void AIStats::save()
|
||||
{
|
||||
char writer[128];
|
||||
list<AIStat *>::iterator it;
|
||||
for (it = stats.begin(); it != stats.end(); it++)
|
||||
for (it = stats.begin(); it != stats.end(); ++it)
|
||||
{
|
||||
AIStat * stat = *it;
|
||||
if (stat->value > 0)
|
||||
|
||||
Reference in New Issue
Block a user