array to vector now

This commit is contained in:
Kai Philipp
2019-09-09 20:34:58 +02:00
parent ee6c80406a
commit 02e8c81974
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -402,7 +402,7 @@ SessionData::GetPlayerData()
} }
void void
SessionData::SetPlayerLastGames(std::array<unsigned long, 25> lastGames) SessionData::SetPlayerLastGames(std::vector<unsigned long> lastGames)
{ {
boost::mutex::scoped_lock lock(m_dataMutex); boost::mutex::scoped_lock lock(m_dataMutex);
m_lastGames = lastGames; m_lastGames = lastGames;
@@ -418,7 +418,7 @@ SessionData::AddPlayerLastGame(unsigned long lastGame)
// @TODO: remove overdued entries // @TODO: remove overdued entries
} }
std::array<unsigned long, 25> std::vector<unsigned long>
SessionData::GetPlayerLastGames() SessionData::GetPlayerLastGames()
{ {
boost::mutex::scoped_lock lock(m_dataMutex); boost::mutex::scoped_lock lock(m_dataMutex);
+4 -4
View File
@@ -40,7 +40,7 @@ typedef unsigned SessionId;
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/enable_shared_from_this.hpp> #include <boost/enable_shared_from_this.hpp>
#include <string> #include <string>
#include <array> #include <vector>
#include <net/socket_helper.h> #include <net/socket_helper.h>
#include <net/sessiondatacallback.h> #include <net/sessiondatacallback.h>
@@ -128,8 +128,8 @@ public:
boost::shared_ptr<PlayerData> GetPlayerData(); boost::shared_ptr<PlayerData> GetPlayerData();
void AddPlayerLastGame(unsigned long lastGames); void AddPlayerLastGame(unsigned long lastGames);
void SetPlayerLastGames(std::array<unsigned long, 25> lastGames); void SetPlayerLastGames(std::vector<unsigned long> lastGames);
std::array<unsigned long, 25> GetPlayerLastGames(); std::vector<unsigned long> GetPlayerLastGames();
bool IsPlayerAllowedToJoinLimitRank(); bool IsPlayerAllowedToJoinLimitRank();
std::string GetRemoteIPAddressFromSocket() const; std::string GetRemoteIPAddressFromSocket() const;
@@ -165,7 +165,7 @@ private:
std::string m_password; std::string m_password;
boost::shared_ptr<PlayerData> m_playerData; boost::shared_ptr<PlayerData> m_playerData;
std::array<unsigned long, 25> m_lastGames; std::vector<unsigned long> m_lastGames;
mutable boost::mutex m_dataMutex; mutable boost::mutex m_dataMutex;
}; };