From 517284b80db96b58ea68d7ba974345dc5a2236bb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jan 2014 11:42:34 +0000 Subject: fix for extra icons in XFire git-svn-id: http://svn.miranda-ng.org/main/trunk@7453 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/Xfire_gamelist.cpp | 64 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'protocols/Xfire/src/Xfire_gamelist.cpp') diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 7298ff5e91..0a5ac9cfaa 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -5,7 +5,7 @@ //liefert bestimmtes game zurück Xfire_game* Xfire_gamelist::getGame(unsigned int dbid) { - if(dbidid==gameid) + if (game->id==gameid) return game; } return NULL; @@ -30,7 +30,7 @@ void Xfire_gamelist::readGamelist(int anz) { //erzeuge gameobject Xfire_game* game=new Xfire_game(); - if(game) { + if (game) { //lese das spiel ein game->readFromDB(i); //icons laden @@ -59,7 +59,7 @@ Xfire_gamelist::Xfire_gamelist() Xfire_gamelist::~Xfire_gamelist() { for(unsigned int i = 0 ; i < gamelist.size() ; i ++) { Xfire_game* game=(Xfire_game*)gamelist.at(i); - if(game) delete game; + if (game) delete game; } gamelist.clear(); DeleteCriticalSection(&gamlistMutex); @@ -69,17 +69,17 @@ Xfire_gamelist::~Xfire_gamelist() { BOOL Xfire_gamelist::getnextGame(Xfire_game**currentgame) { //kein pointer dann false zurückliefern - if(currentgame==NULL) + if (currentgame==NULL) return FALSE; //is die derzeitige id kleiner wie die anzahl an games, dann passendes game zurückliefern - if(nextgameidskip||(*currentgame)->id==32||(*currentgame)->id==33||(*currentgame)->id==34||(*currentgame)->id==35) + if ((*currentgame)->skip||(*currentgame)->id==32||(*currentgame)->id==33||(*currentgame)->id==34||(*currentgame)->id==35) { return getnextGame(currentgame); } @@ -96,7 +96,7 @@ BOOL Xfire_gamelist::getnextGame(Xfire_game**currentgame) void Xfire_gamelist::Block(BOOL block) { - if(block) + if (block) EnterCriticalSection(&gamlistMutex); else LeaveCriticalSection(&gamlistMutex); @@ -117,7 +117,7 @@ BOOL Xfire_gamelist::Removegame(int id) { std::vector::iterator i = gamelist.begin(); while( i != gamelist.end() ) { - if((*i)->id == id) { + if ((*i)->id == id) { (*i)->remoteMenuitem(); gamelist.erase(i); return TRUE; @@ -138,7 +138,7 @@ int Xfire_gamelist::CurrentGame() void Xfire_gamelist::createStartmenu() { //keine games in der internen liste? abbruch - if(gamelist.size()==0) + if (gamelist.size()==0) return; //sortierarray @@ -158,7 +158,7 @@ void Xfire_gamelist::createStartmenu() Xfire_game* game=(Xfire_game*)gamelist.at(sorttemp[i-1]); Xfire_game* game2=(Xfire_game*)gamelist.at(sorttemp[i]); //sortieren - if(strcmp(game->name,game2->name)>0) + if (strcmp(game->name,game2->name)>0) { int tempi=sorttemp[i-1]; sorttemp[i-1]=sorttemp[i]; @@ -187,7 +187,7 @@ void Xfire_gamelist::writeDatabase() { for(unsigned int i = 0 ; i < gamelist.size() ; i ++) { Xfire_game* game=(Xfire_game*)gamelist.at(i); - if(game) game->writeToDB(i); + if (game) game->writeToDB(i); } //anzahl aktualisieren @@ -199,12 +199,12 @@ BOOL Xfire_gamelist::Gameinlist(int id,int*dbid) { for(unsigned int i = 0 ; i < gamelist.size() ; i ++) { Xfire_game* game=(Xfire_game*)gamelist.at(i); - if(game) + if (game) { - if(game->id==id) + if (game->id==id) { //soll eine dbid zurückgeliefert werden? dann setzen - if(dbid) + if (dbid) *dbid=i; return TRUE; @@ -229,7 +229,7 @@ void Xfire_gamelist::clearStartmenu() //einzelene menüpunkte entfernen for(unsigned int i = 0 ; i < gamelist.size() ; i ++) { Xfire_game* game=(Xfire_game*)gamelist.at(i); - if(game) game->remoteMenuitem(); + if (game) game->remoteMenuitem(); } } @@ -238,7 +238,7 @@ void Xfire_gamelist::clearGamelist() { createDummyMenuItem(); for(unsigned int i = 0 ; i < gamelist.size() ; i ++) { Xfire_game* game=(Xfire_game*)gamelist.at(i); - if(game) delete game; + if (game) delete game; } gamelist.clear(); } @@ -272,10 +272,10 @@ void Xfire_gamelist::clearDatabase(BOOL dontaddcustom) while(somethingfound) { somethingfound=FALSE; //customeintrag? dann ab in die gameliste damit - if(this->readBytefromDB("gamecustom",i3)==1) + if (this->readBytefromDB("gamecustom",i3)==1) { //customgame nur in die liste adden wenn es gewollt is - if(!dontaddcustom) + if (!dontaddcustom) { //erzeuge gameobject Xfire_game* game=new Xfire_game(); @@ -290,21 +290,21 @@ void Xfire_gamelist::clearDatabase(BOOL dontaddcustom) } } - if(this->removeDBEntry("gamecustom",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gameid",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamepath",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamepwargs",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gameuserargs",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamecmdline",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamencmdline",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamelaunch",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamenetargs",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamemulti",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamesendid",i3)) somethingfound=TRUE; - if(this->removeDBEntry("gamesetsmsg",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamecustom",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gameid",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamepath",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamepwargs",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gameuserargs",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamecmdline",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamencmdline",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamelaunch",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamenetargs",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamemulti",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamesendid",i3)) somethingfound=TRUE; + if (this->removeDBEntry("gamesetsmsg",i3)) somethingfound=TRUE; for(int i2=0;i2<10;i2++) - if(this->removeDBEntry("gamepath",i3,i2)) somethingfound=TRUE; + if (this->removeDBEntry("gamepath",i3,i2)) somethingfound=TRUE; i3++; } } \ No newline at end of file -- cgit v1.2.3