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
SessionData::SetPlayerLastGames(std::array<unsigned long, 25> lastGames)
SessionData::SetPlayerLastGames(std::vector<unsigned long> lastGames)
{
boost::mutex::scoped_lock lock(m_dataMutex);
m_lastGames = lastGames;
@@ -418,7 +418,7 @@ SessionData::AddPlayerLastGame(unsigned long lastGame)
// @TODO: remove overdued entries
}
std::array<unsigned long, 25>
std::vector<unsigned long>
SessionData::GetPlayerLastGames()
{
boost::mutex::scoped_lock lock(m_dataMutex);
+4 -4
View File
@@ -40,7 +40,7 @@ typedef unsigned SessionId;
#include <boost/thread.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <string>
#include <array>
#include <vector>
#include <net/socket_helper.h>
#include <net/sessiondatacallback.h>
@@ -128,8 +128,8 @@ public:
boost::shared_ptr<PlayerData> GetPlayerData();
void AddPlayerLastGame(unsigned long lastGames);
void SetPlayerLastGames(std::array<unsigned long, 25> lastGames);
std::array<unsigned long, 25> GetPlayerLastGames();
void SetPlayerLastGames(std::vector<unsigned long> lastGames);
std::vector<unsigned long> GetPlayerLastGames();
bool IsPlayerAllowedToJoinLimitRank();
std::string GetRemoteIPAddressFromSocket() const;
@@ -165,7 +165,7 @@ private:
std::string m_password;
boost::shared_ptr<PlayerData> m_playerData;
std::array<unsigned long, 25> m_lastGames;
std::vector<unsigned long> m_lastGames;
mutable boost::mutex m_dataMutex;
};