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
This commit is contained in:
Giacomo Pozzoni
2020-07-18 16:34:45 +00:00
committed by GitHub
parent c54dc3ef92
commit 7032ee0bdb
9 changed files with 25 additions and 44 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
{
@@ -126,7 +124,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

@@ -34,8 +34,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
{
@@ -302,7 +300,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);