mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Core/GUARD_RETURN): correct typo (#3743)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#define RETURN_GUARD(mutex, retval) if (!mutex.try_lock()) \
|
||||
#define GUARD_RETURN(mutex, retval) if (!mutex.try_lock()) \
|
||||
return retval; \
|
||||
std::lock_guard<decltype(mutex)> guard(mutex, std::adopt_lock)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
|
||||
void Insert(K key, T* val)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(_mutex);
|
||||
std::lock_guard<std::mutex> guard(mutex);
|
||||
|
||||
if (_items.size() > FlushLimit)
|
||||
Clear();
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
T* Get(K key)
|
||||
{
|
||||
RETURN_GUAD(mutex, false);
|
||||
GUARD_RETURN(mutex, nullptr);
|
||||
typename std::map<K, T*>::iterator itr = _items.find(key);
|
||||
if (itr != _items.end())
|
||||
return itr->second;
|
||||
|
||||
@@ -72,7 +72,7 @@ void MPQManager::InitializeDBC()
|
||||
|
||||
FILE* MPQManager::GetFile(const std::string& path )
|
||||
{
|
||||
RETURN_GUAD(mutex, false);
|
||||
GUARD_RETURN(mutex, nullptr);
|
||||
MPQFile file(path.c_str());
|
||||
if (file.isEof())
|
||||
return nullptr;
|
||||
@@ -87,7 +87,7 @@ DBC* MPQManager::GetDBC(const std::string& name )
|
||||
|
||||
FILE* MPQManager::GetFileFrom(const std::string& path, MPQArchive* file )
|
||||
{
|
||||
RETURN_GUAD(mutex, false);
|
||||
GUARD_RETURN(mutex, nullptr);
|
||||
mpq_archive* mpq_a = file->mpq_a;
|
||||
|
||||
uint32_t filenum;
|
||||
|
||||
Reference in New Issue
Block a user