Core/Misc: Replace boost::shared_mutex with std::shared_mutex (#24328)

* Core/Misc: Replace boost::shared_mutex with std::shared_mutex

* Remove std forward declarations

(cherry picked from commit 7032ee0bdb)
This commit is contained in:
Giacomo Pozzoni
2020-07-18 16:34:45 +00:00
committed by Shauren
parent 196a62c031
commit fda8a09766
12 changed files with 36 additions and 69 deletions

View File

@@ -33,8 +33,6 @@ EndScriptData */
#include "Realm.h"
#include "World.h"
#include "WorldSession.h"
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
class gm_commandscript : public CommandScript
{
@@ -129,7 +127,7 @@ public:
bool first = true;
bool footer = false;
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType const& m = ObjectAccessor::GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{

View File

@@ -35,8 +35,6 @@ EndScriptData */
#include "RBAC.h"
#include "World.h"
#include "WorldSession.h"
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
class reset_commandscript : public CommandScript
{
@@ -300,7 +298,7 @@ public:
stmt->setUInt16(0, uint16(atLogin));
CharacterDatabase.Execute(stmt);
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType const& plist = ObjectAccessor::GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
itr->second->SetAtLoginFlag(atLogin);