Revert ProtoBuf to version 2.6.1 and running astyle

This commit is contained in:
Albert Medela
2016-07-12 18:36:25 +02:00
parent 417d9a5bd2
commit 8f5813416d
6 changed files with 3131 additions and 1947 deletions
+13 -13
View File
@@ -457,8 +457,8 @@ ServerGame::InternalEndGame()
{
StoreAndResetRanking();
m_game.reset();
// @XXX: reset NumJoinsPerPlayerMap (if a game restarts, the number of joins will be set to 0 for each player)
ResetNumJoinsPerPlayer();
// @XXX: reset NumJoinsPerPlayerMap (if a game restarts, the number of joins will be set to 0 for each player)
ResetNumJoinsPerPlayer();
}
void
@@ -1169,21 +1169,21 @@ ServerGame::GetNextGameNum()
void
ServerGame::AddPlayerToNumJoinsPerPlayer(const std::string &playerName)
{
if(m_numjoinsp.find(playerName) != m_numjoinsp.end()){
m_numjoinsp[playerName] = m_numjoinsp[playerName] + 1;
}else{
m_numjoinsp[playerName] = 1;
}
if(m_numjoinsp.find(playerName) != m_numjoinsp.end()) {
m_numjoinsp[playerName] = m_numjoinsp[playerName] + 1;
} else {
m_numjoinsp[playerName] = 1;
}
}
int
ServerGame::GetNumJoinsPerPlayer(const std::string &playerName)
{
int num = 0;
if(m_numjoinsp.find(playerName) != m_numjoinsp.end()){
num = m_numjoinsp[playerName];
}
return num;
int num = 0;
if(m_numjoinsp.find(playerName) != m_numjoinsp.end()) {
num = m_numjoinsp[playerName];
}
return num;
}
void
@@ -1193,7 +1193,7 @@ ServerGame::ResetNumJoinsPerPlayer()
NumJoinsPerPlayerMap::const_iterator numj_end = m_numjoinsp.end();
while (numj_i != numj_end) {
m_numjoinsp[numj_i->first] = 0;
m_numjoinsp[numj_i->first] = 0;
++numj_i;
}
}