This commit is contained in:
aozhiwei 2022-10-24 21:42:41 +08:00
parent feb5099c63
commit 638084b3e7
2 changed files with 1 additions and 8 deletions

View File

@ -55,12 +55,6 @@ void MatchPool::TraverseTeam(std::function<void (MatchTeamNew*, bool&)> func)
}
}
std::tuple<std::string, MatchTeamNew*>* MatchPool::GetMatchInfo(int socket_handle)
{
auto itr = socket_hash_.find(socket_handle);
return itr != socket_hash_.end() ? &itr->second : nullptr;
}
void MatchPool::RemoveTeam(const std::string& team_uuid)
{
auto itr = team_hash_.find(team_uuid);

View File

@ -25,7 +25,6 @@ private:
bool NeedMatch(const cs::CMJoin& msg);
MatchTeamNew* GetTeam(const std::string& team_uuid);
std::tuple<std::string, MatchTeamNew*>* GetMatchInfo(int socket_handle);
void RemoveTeam(const std::string& team_uuid);
void RemoveSocket(int socket_handle);
void Update();
@ -34,8 +33,8 @@ private:
a8::TimerAttacher timer_attacher_;
std::map<std::string, MatchTeamNew*> team_hash_;
std::map<int, std::tuple<std::string, MatchTeamNew*>> socket_hash_;
std::map<long long, std::shared_ptr<TeamGroup>> group_hash_;
std::map<long long, std::shared_ptr<TeamGroup>> group_hash_;
std::map<long long, std::shared_ptr<TeamGroup>> matching_list_;
std::map<long long, std::shared_ptr<TeamGroup>> matchok_list_;
};