Small fixes.

This commit is contained in:
lotodore
2009-09-27 21:46:44 +00:00
parent 5095c03926
commit d28fe8eee7
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -21,6 +21,7 @@
#define STARTWINDOWIMPL_H #define STARTWINDOWIMPL_H
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <assert.h>
#include "ui_startwindow.h" #include "ui_startwindow.h"
#include "game_defs.h" #include "game_defs.h"
+2 -2
View File
@@ -121,7 +121,7 @@ SessionManager::GetSessionByPlayerName(const string playerName) const
} }
SessionWrapper SessionWrapper
SessionManager::GetSessionByUniquePlayerId(unsigned uniqueId, bool preInitSessions) const SessionManager::GetSessionByUniquePlayerId(unsigned uniqueId, bool initSessions) const
{ {
SessionWrapper tmpSession; SessionWrapper tmpSession;
boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex); boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex);
@@ -132,7 +132,7 @@ SessionManager::GetSessionByUniquePlayerId(unsigned uniqueId, bool preInitSessio
while (session_i != session_end) while (session_i != session_end)
{ {
// Check all players which are fully connected. // Check all players which are fully connected.
if (preInitSessions || session_i->second.sessionData->GetState() != SessionData::Init) if (initSessions || session_i->second.sessionData->GetState() != SessionData::Init)
{ {
boost::shared_ptr<PlayerData> tmpPlayer(session_i->second.playerData); boost::shared_ptr<PlayerData> tmpPlayer(session_i->second.playerData);
if (!tmpPlayer.get()) if (!tmpPlayer.get())
+1 -1
View File
@@ -55,7 +55,7 @@ public:
SessionWrapper GetSessionById(SessionId id) const; SessionWrapper GetSessionById(SessionId id) const;
SessionWrapper GetSessionByPlayerName(const std::string playerName) const; SessionWrapper GetSessionByPlayerName(const std::string playerName) const;
SessionWrapper GetSessionByUniquePlayerId(unsigned uniqueId, bool preInitSessions = false) const; SessionWrapper GetSessionByUniquePlayerId(unsigned uniqueId, bool initSessions = false) const;
PlayerDataList GetPlayerDataList() const; PlayerDataList GetPlayerDataList() const;
PlayerIdList GetPlayerIdList(SessionData::State state) const; PlayerIdList GetPlayerIdList(SessionData::State state) const;