Core/Misc: Fixed nopch and clang 6.0 warnings

This commit is contained in:
Shauren
2018-12-09 16:07:38 +01:00
parent 07636dc9af
commit e9bcae1fad
4 changed files with 9 additions and 7 deletions

View File

@@ -33,6 +33,7 @@ static void lockingCallback(int mode, int type, const char* /*file*/, int /*line
static void threadIdCallback(CRYPTO_THREADID * id)
{
(void)id;
CRYPTO_THREADID_set_numeric(id, std::hash<std::thread::id>()(std::this_thread::get_id()));
}
@@ -41,9 +42,13 @@ void OpenSSLCrypto::threadsSetup()
cryptoLocks.resize(CRYPTO_num_locks());
for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
{
cryptoLocks[i] = new std::mutex;
cryptoLocks[i] = new std::mutex();
}
(void)&threadIdCallback;
CRYPTO_THREADID_set_callback(threadIdCallback);
(void)&lockingCallback;
CRYPTO_set_locking_callback(lockingCallback);
}

View File

@@ -18,6 +18,7 @@
#pragma once
#include "Packet.h"
#include "DBCEnums.h"
#include "ItemPacketsCommon.h"
#include "ObjectGuid.h"
#include "SharedDefines.h"

View File

@@ -19,6 +19,7 @@
#define SystemPackets_h__
#include "Packet.h"
#include "ObjectGuid.h"
#include "Optional.h"
namespace WorldPackets

View File

@@ -1626,8 +1626,6 @@ class FlameLeviathanPursuedTargetSelector
};
public:
explicit FlameLeviathanPursuedTargetSelector(Unit* unit) : _me(unit) { };
bool operator()(WorldObject* target) const
{
//! No players, only vehicles. Pursue is never cast on players.
@@ -1656,9 +1654,6 @@ class FlameLeviathanPursuedTargetSelector
return !playerFound;
}
private:
Unit const* _me;
};
class spell_pursue : public SpellScriptLoader
@@ -1679,7 +1674,7 @@ class spell_pursue : public SpellScriptLoader
private:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(FlameLeviathanPursuedTargetSelector(GetCaster()));
targets.remove_if(FlameLeviathanPursuedTargetSelector());
if (!targets.empty())
{
//! In the end, only one target should be selected