summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deps/acelite/ace/Auto_Ptr.h1
-rw-r--r--deps/acelite/ace/Bound_Ptr.h4
-rw-r--r--deps/acelite/ace/Bound_Ptr.inl4
-rw-r--r--deps/acelite/ace/OS_NS_Thread.cpp2
-rw-r--r--deps/acelite/ace/Proactor.cpp2
-rw-r--r--deps/acelite/ace/Thread_Manager.cpp4
-rw-r--r--deps/acelite/ace/WFMO_Reactor.cpp6
-rw-r--r--deps/acelite/ace/XML_Utils/XML_Helper.h2
-rw-r--r--deps/acelite/ace/XML_Utils/XML_Helper.tpp4
-rw-r--r--deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp4
-rw-r--r--src/cmake/compiler/clang/settings.cmake2
-rw-r--r--src/cmake/compiler/gcc/settings.cmake4
-rw-r--r--src/cmake/compiler/msvc/settings.cmake3
-rw-r--r--src/cmake/macros/FindPCHSupport.cmake3
-rw-r--r--src/common/Common.h10
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h14
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp8
-rw-r--r--src/server/game/Loot/LootMgr.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp3
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp5
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp6
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp2
28 files changed, 61 insertions, 46 deletions
diff --git a/deps/acelite/ace/Auto_Ptr.h b/deps/acelite/ace/Auto_Ptr.h
index e06eb21b4a..5ac19e616d 100644
--- a/deps/acelite/ace/Auto_Ptr.h
+++ b/deps/acelite/ace/Auto_Ptr.h
@@ -76,7 +76,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#include <memory>
#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
(ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)
-using std::auto_ptr;
#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
#else /* ACE_HAS_STANDARD_CPP_LIBRARY */
diff --git a/deps/acelite/ace/Bound_Ptr.h b/deps/acelite/ace/Bound_Ptr.h
index 5c317db6f1..6ab33018c5 100644
--- a/deps/acelite/ace/Bound_Ptr.h
+++ b/deps/acelite/ace/Bound_Ptr.h
@@ -116,7 +116,7 @@ public:
/// Constructor that initializes an ACE_Strong_Bound_Ptr by stealing
/// ownership of an object from an auto_ptr.
- explicit ACE_Strong_Bound_Ptr (auto_ptr<X> p);
+ explicit ACE_Strong_Bound_Ptr (std::unique_ptr<X> p);
/// Copy constructor binds @c this and @a r to the same object.
ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r);
@@ -217,7 +217,7 @@ public:
/// Resets the ACE_Strong_Bound_Ptr to refer to a different
/// underlying object, ownership of which is stolen from the
/// auto_ptr.
- void reset (auto_ptr<X> p);
+ void reset (std::unique_ptr<X> p);
/// Allows us to check for NULL on all ACE_Strong_Bound_Ptr
/// objects.
diff --git a/deps/acelite/ace/Bound_Ptr.inl b/deps/acelite/ace/Bound_Ptr.inl
index fb31747a4f..ccb6cbe132 100644
--- a/deps/acelite/ace/Bound_Ptr.inl
+++ b/deps/acelite/ace/Bound_Ptr.inl
@@ -149,7 +149,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::ACE_Strong_Bound_Ptr (X *p)
}
template <class X, class ACE_LOCK> inline
-ACE_Strong_Bound_Ptr<X, ACE_LOCK>::ACE_Strong_Bound_Ptr (auto_ptr<X> p)
+ACE_Strong_Bound_Ptr<X, ACE_LOCK>::ACE_Strong_Bound_Ptr (std::unique_ptr<X> p)
: counter_ (COUNTER::create_strong ()),
ptr_ (p.release())
{
@@ -304,7 +304,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (X *p)
}
template<class X, class ACE_LOCK> inline void
-ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (auto_ptr<X> p)
+ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset(std::unique_ptr<X> p)
{
COUNTER *old_counter = this->counter_;
X_t *old_ptr = this->ptr_;
diff --git a/deps/acelite/ace/OS_NS_Thread.cpp b/deps/acelite/ace/OS_NS_Thread.cpp
index 2eeb79a580..4858ea0618 100644
--- a/deps/acelite/ace/OS_NS_Thread.cpp
+++ b/deps/acelite/ace/OS_NS_Thread.cpp
@@ -3862,7 +3862,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
else
thread_args = thread_adapter;
- auto_ptr <ACE_Base_Thread_Adapter> auto_thread_args;
+ std::unique_ptr <ACE_Base_Thread_Adapter> auto_thread_args;
if (thread_adapter == 0)
ACE_auto_ptr_reset (auto_thread_args,
diff --git a/deps/acelite/ace/Proactor.cpp b/deps/acelite/ace/Proactor.cpp
index cd8e9133c8..1b4c8e075a 100644
--- a/deps/acelite/ace/Proactor.cpp
+++ b/deps/acelite/ace/Proactor.cpp
@@ -243,7 +243,7 @@ ACE_Proactor_Handle_Timeout_Upcall::timeout (ACE_Proactor_Timer_Queue &,
ACE_TEXT ("create_asynch_timer failed")),
-1);
- auto_ptr<ACE_Asynch_Result_Impl> safe_asynch_timer (asynch_timer);
+ std::unique_ptr<ACE_Asynch_Result_Impl> safe_asynch_timer (asynch_timer);
// Post a completion.
if (-1 == safe_asynch_timer->post_completion
diff --git a/deps/acelite/ace/Thread_Manager.cpp b/deps/acelite/ace/Thread_Manager.cpp
index 657ac9f350..6e2da7db33 100644
--- a/deps/acelite/ace/Thread_Manager.cpp
+++ b/deps/acelite/ace/Thread_Manager.cpp
@@ -580,7 +580,7 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func,
// Create a new thread running <func>. *Must* be called with the
// <lock_> held...
// Get a "new" Thread Descriptor from the freelist.
- auto_ptr<ACE_Thread_Descriptor> new_thr_desc (this->thread_desc_freelist_.remove ());
+ std::unique_ptr<ACE_Thread_Descriptor> new_thr_desc (this->thread_desc_freelist_.remove ());
// Reset thread descriptor status
new_thr_desc->reset (this);
@@ -607,7 +607,7 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func,
flags),
-1);
# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- auto_ptr <ACE_Base_Thread_Adapter> auto_thread_args (static_cast<ACE_Base_Thread_Adapter *> (thread_args));
+ std::unique_ptr <ACE_Base_Thread_Adapter> auto_thread_args (static_cast<ACE_Base_Thread_Adapter *> (thread_args));
ACE_TRACE ("ACE_Thread_Manager::spawn_i");
ACE_hthread_t thr_handle;
diff --git a/deps/acelite/ace/WFMO_Reactor.cpp b/deps/acelite/ace/WFMO_Reactor.cpp
index f2c103d1c0..32b64908f3 100644
--- a/deps/acelite/ace/WFMO_Reactor.cpp
+++ b/deps/acelite/ace/WFMO_Reactor.cpp
@@ -1384,7 +1384,7 @@ ACE_WFMO_Reactor::register_handler_i (ACE_HANDLE event_handle,
long new_network_events = 0;
bool delete_event = false;
- auto_ptr <ACE_Auto_Event> event;
+ std::unique_ptr <ACE_Auto_Event> event;
// Look up the repository to see if the <event_handler> is already
// there.
@@ -1403,8 +1403,8 @@ ACE_WFMO_Reactor::register_handler_i (ACE_HANDLE event_handle,
{
// Note: don't change this since some C++ compilers have
// <auto_ptr>s that don't work properly...
- auto_ptr<ACE_Auto_Event> tmp (new ACE_Auto_Event);
- event = tmp;
+ std::unique_ptr<ACE_Auto_Event> tmp (new ACE_Auto_Event);
+ event = std::move(tmp);
event_handle = event->handle ();
delete_event = true;
}
diff --git a/deps/acelite/ace/XML_Utils/XML_Helper.h b/deps/acelite/ace/XML_Utils/XML_Helper.h
index 6fa5b8d789..9deeda5e94 100644
--- a/deps/acelite/ace/XML_Utils/XML_Helper.h
+++ b/deps/acelite/ace/XML_Utils/XML_Helper.h
@@ -83,7 +83,7 @@ namespace XML
private:
bool initialized_;
XERCES_CPP_NAMESPACE::DOMImplementation *impl_;
- mutable std::auto_ptr<XERCES_CPP_NAMESPACE::XercesDOMParser> parser_;
+ mutable std::unique_ptr<XERCES_CPP_NAMESPACE::XercesDOMParser> parser_;
Resolver *resolver_;
bool release_resolver_;
diff --git a/deps/acelite/ace/XML_Utils/XML_Helper.tpp b/deps/acelite/ace/XML_Utils/XML_Helper.tpp
index bd74e5a923..4c0b9fbf72 100644
--- a/deps/acelite/ace/XML_Utils/XML_Helper.tpp
+++ b/deps/acelite/ace/XML_Utils/XML_Helper.tpp
@@ -310,13 +310,13 @@ namespace XML
serializer->release ();
return retn;
#else
- std::auto_ptr <XERCES_CPP_NAMESPACE::DOMWriter> writer (impl_->createDOMWriter());
+ std::unique_ptr <XERCES_CPP_NAMESPACE::DOMWriter> writer (impl_->createDOMWriter());
if (writer->canSetFeature (XMLUni::fgDOMWRTFormatPrettyPrint,
true))
writer->setFeature (XMLUni::fgDOMWRTFormatPrettyPrint, true);
- std::auto_ptr <xercesc::XMLFormatTarget> ft (new xercesc::LocalFileFormatTarget(ACE_TEXT_ALWAYS_CHAR (file)));
+ std::unique_ptr <xercesc::XMLFormatTarget> ft (new xercesc::LocalFileFormatTarget(ACE_TEXT_ALWAYS_CHAR (file)));
retn = writer->writeNode(ft.get (), *doc);
return retn;
diff --git a/deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp b/deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp
index 601e0f9f33..abe607291c 100644
--- a/deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp
+++ b/deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp
@@ -149,7 +149,7 @@ namespace XSCRT
{
if (map_.get () == 0)
{
- map_ = std::auto_ptr<Map_> (new Map_);
+ map_ = std::unique_ptr<Map_> (new Map_);
}
if (!map_->insert (
@@ -255,7 +255,7 @@ namespace XSCRT
std::map<IdentityProvider const*, Type*, IdentityComparator>
Map_;
- std::auto_ptr<Map_> map_;
+ std::unique_ptr<Map_> map_;
};
// Fundamental types template.
diff --git a/src/cmake/compiler/clang/settings.cmake b/src/cmake/compiler/clang/settings.cmake
index 429b8d634b..93eb334a2e 100644
--- a/src/cmake/compiler/clang/settings.cmake
+++ b/src/cmake/compiler/clang/settings.cmake
@@ -16,5 +16,5 @@ endif()
# -Wno-narrowing needed to suppress a warning in g3d
# -Wno-deprecated-register is needed to suppress gsoap warnings on Unix systems.
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-narrowing -Wno-deprecated-register")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wno-narrowing -Wno-deprecated-register")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1")
diff --git a/src/cmake/compiler/gcc/settings.cmake b/src/cmake/compiler/gcc/settings.cmake
index 18bc452bdc..645999dcc4 100644
--- a/src/cmake/compiler/gcc/settings.cmake
+++ b/src/cmake/compiler/gcc/settings.cmake
@@ -7,8 +7,8 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
message(FATAL_ERROR "GCC: This project requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-message(STATUS "GCC: Enabled c++14 support")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+message(STATUS "GCC: Enabled c++17 support")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
message(STATUS "GCC: Enabled C99 support")
diff --git a/src/cmake/compiler/msvc/settings.cmake b/src/cmake/compiler/msvc/settings.cmake
index 7ce1f7f200..2b75f2e222 100644
--- a/src/cmake/compiler/msvc/settings.cmake
+++ b/src/cmake/compiler/msvc/settings.cmake
@@ -24,6 +24,9 @@ else()
message(STATUS "MSVC: Enabled SSE2 support")
endif()
+message(STATUS "MSVC: Enabled ะก++17 support")
+set(CMAKE_CXX_STANDARD 17)
+
# Set build-directive (used in core to tell which buildtype we used)
add_definitions(-D_BUILD_DIRECTIVE=\\"$(ConfigurationName)\\")
diff --git a/src/cmake/macros/FindPCHSupport.cmake b/src/cmake/macros/FindPCHSupport.cmake
index 9c77605616..d083d9ac57 100644
--- a/src/cmake/macros/FindPCHSupport.cmake
+++ b/src/cmake/macros/FindPCHSupport.cmake
@@ -18,9 +18,6 @@ function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
# Set the prefix header
set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${PCH_HEADER})
-
- # Workaround for cotire bug: https://github.com/sakra/cotire/issues/138
- set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)
endforeach()
cotire(${TARGET_NAME_LIST})
diff --git a/src/common/Common.h b/src/common/Common.h
index fe3311a55b..ad353ac235 100644
--- a/src/common/Common.h
+++ b/src/common/Common.h
@@ -209,4 +209,14 @@ typedef std::vector<std::string> StringVector;
ACE_Read_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+namespace ACORE
+{
+ template<class ArgumentType, class ResultType>
+ struct unary_function
+ {
+ typedef ArgumentType argument_type;
+ typedef ResultType result_type;
+ };
+}
+
#endif
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index ad2c8483db..7ba101728a 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -28,7 +28,7 @@ enum SelectAggroTarget
};
// default predicate function to select target based on distance, player and/or aura criteria
-struct DefaultTargetSelector : public std::unary_function<Unit*, bool>
+struct DefaultTargetSelector : public ACORE::unary_function<Unit*, bool>
{
const Unit* me;
float m_dist;
@@ -78,7 +78,7 @@ struct DefaultTargetSelector : public std::unary_function<Unit*, bool>
// Target selector for spell casts checking range, auras and attributes
// TODO: Add more checks from Spell::CheckCast
-struct SpellTargetSelector : public std::unary_function<Unit*, bool>
+struct SpellTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
SpellTargetSelector(Unit* caster, uint32 spellId);
@@ -92,7 +92,7 @@ struct SpellTargetSelector : public std::unary_function<Unit*, bool>
// Very simple target selector, will just skip main target
// NOTE: When passing to UnitAI::SelectTarget remember to use 0 as position for random selection
// because tank will not be in the temporary list
-struct NonTankTargetSelector : public std::unary_function<Unit*, bool>
+struct NonTankTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
NonTankTargetSelector(Creature* source, bool playerOnly = true) : _source(source), _playerOnly(playerOnly) { }
@@ -104,7 +104,7 @@ struct NonTankTargetSelector : public std::unary_function<Unit*, bool>
};
// Simple selector for units using mana
-struct PowerUsersSelector : public std::unary_function<Unit*, bool>
+struct PowerUsersSelector : public ACORE::unary_function<Unit*, bool>
{
Unit const* _me;
Powers const _power;
@@ -135,7 +135,7 @@ struct PowerUsersSelector : public std::unary_function<Unit*, bool>
}
};
-struct FarthestTargetSelector : public std::unary_function<Unit*, bool>
+struct FarthestTargetSelector : public ACORE::unary_function<Unit*, bool>
{
FarthestTargetSelector(Unit const* unit, float dist, bool playerOnly, bool inLos) : _me(unit), _dist(dist), _playerOnly(playerOnly), _inLos(inLos) {}
@@ -191,7 +191,7 @@ class UnitAI
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
// Select the targets satifying the predicate.
- // predicate shall extend std::unary_function<Unit*, bool>
+ // predicate shall extend ACORE::unary_function<Unit*, bool>
template <class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE const& predicate)
{
ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList();
@@ -241,7 +241,7 @@ class UnitAI
void SelectTargetList(std::list<Unit*>& targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
// Select the targets satifying the predicate.
- // predicate shall extend std::unary_function<Unit*, bool>
+ // predicate shall extend ACORE::unary_function<Unit*, bool>
template <class PREDICATE> void SelectTargetList(std::list<Unit*>& targetList, PREDICATE const& predicate, uint32 maxTargets, SelectAggroTarget targetType)
{
ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList();
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index c1b9d82f40..0d2754b913 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -36,6 +36,8 @@
#include "BattlegroundQueue.h"
#include "GameGraveyard.h"
#include <unordered_map>
+#include <random>
+
#ifdef ELUNA
#include "LuaEngine.h"
#endif
@@ -998,8 +1000,10 @@ void RandomBattlegroundSystem::Update(uint32 diff)
small.push_back(BATTLEGROUND_AB);
small.push_back(BATTLEGROUND_SA);
- std::random_shuffle(big.begin(), big.end());
- std::random_shuffle(small.begin(), small.end());
+ auto rng = std::default_random_engine{};
+
+ std::shuffle(big.begin(), big.end(), rng);
+ std::shuffle(small.begin(), small.end(), rng);
m_BgOrder.push_back(small.back()); small.pop_back();
m_BgOrder.push_back(small.back()); small.pop_back();
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index ba7392fe98..735cdb1a3f 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -42,7 +42,7 @@ LootStore LootTemplates_Skinning("skinning_loot_template", "creature s
LootStore LootTemplates_Spell("spell_loot_template", "spell id (random item creating)", false);
// Selects invalid loot items to be removed from group possible entries (before rolling)
-struct LootGroupInvalidSelector : public std::unary_function<LootStoreItem*, bool>
+struct LootGroupInvalidSelector : public ACORE::unary_function<LootStoreItem*, bool>
{
explicit LootGroupInvalidSelector(Loot const& loot, uint16 lootMode) : _loot(loot), _lootMode(lootMode) { }
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index ceb0655e6d..5e3b369061 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -9,6 +9,7 @@
#include "icecrown_citadel.h"
#include "SpellInfo.h"
#include "Player.h"
+#include <random>
enum ScriptTexts
{
@@ -387,7 +388,7 @@ class boss_lady_deathwhisper : public CreatureScript
}
std::vector<Player*>::iterator begin=validPlayers.begin(), end=validPlayers.end();
- std::random_shuffle(begin, end);
+ std::shuffle(begin, end, std::default_random_engine{});
for (uint8 i = 0; i < RAID_MODE<uint8>(0, 1, 1, 3) && i < validPlayers.size(); i++)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 490e4791b7..9bb029bed2 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -11,6 +11,7 @@
#include "PassiveAI.h"
#include "Player.h"
#include "Vehicle.h"
+#include <random>
enum ScriptTexts
{
@@ -58,7 +59,7 @@ enum Events
uint32 const boneSpikeSummonId[3] = {69062, 72669, 72670};
-struct BoneStormMoveTargetSelector : public std::unary_function<Unit*, bool>
+struct BoneStormMoveTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
BoneStormMoveTargetSelector(Creature* source) : _source(source) { }
@@ -549,7 +550,7 @@ public:
validPlayers.push_back(plr);
std::vector<Player*>::iterator begin=validPlayers.begin(), end=validPlayers.end();
- std::random_shuffle(begin, end);
+ std::shuffle(begin, end, std::default_random_engine{});
for (uint8 i = 0; i < boneSpikeCount && i < validPlayers.size(); ++i)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 788458e2b4..fc4faff42b 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -188,7 +188,7 @@ private:
};
// xinef: malleable goo selector, check for target validity
-struct MalleableGooSelector : public std::unary_function<Unit*, bool>
+struct MalleableGooSelector : public ACORE::unary_function<Unit*, bool>
{
const Unit* me;
MalleableGooSelector(Unit const* unit) : me(unit) {}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index cc0b60f095..9d69d35b33 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -227,7 +227,7 @@ class IceTombSummonEvent : public BasicEvent
uint64 _sindragosaGUID;
};
-struct LastPhaseIceTombTargetSelector : public std::unary_function<Unit*, bool>
+struct LastPhaseIceTombTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
LastPhaseIceTombTargetSelector(Creature* source) : _source(source) { }
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 27cbb5a543..b33041dee3 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -359,7 +359,7 @@ void SendPacketToPlayers(WorldPacket const* data, Unit* source)
}
-struct NonTankLKTargetSelector : public std::unary_function<Unit*, bool>
+struct NonTankLKTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
NonTankLKTargetSelector(Creature* source, bool playerOnly = true, bool reqLOS = false, float maxDist = 0.0f, uint32 exclude1 = 0, uint32 exclude2 = 0) : _source(source), _playerOnly(playerOnly), _reqLOS(reqLOS), _maxDist(maxDist), _exclude1(exclude1), _exclude2(exclude2) { }
@@ -394,7 +394,7 @@ private:
};
-struct DefileTargetSelector : public std::unary_function<Unit*, bool>
+struct DefileTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
DefileTargetSelector(Creature* source) : _source(source) { }
@@ -551,7 +551,7 @@ private:
Creature& _owner;
};
-class NecroticPlagueTargetCheck : public std::unary_function<Unit*, bool>
+class NecroticPlagueTargetCheck : public ACORE::unary_function<Unit*, bool>
{
public:
NecroticPlagueTargetCheck(Unit const* obj, uint32 notAura1, uint32 notAura2) : _sourceObj(obj), _notAura1(notAura1), _notAura2(notAura2) {}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
index 4a9f689e2d..8c166ac5ea 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
@@ -144,7 +144,7 @@ class RisenArchmageCheck
}
};
-struct ManaVoidSelector : public std::unary_function<Unit*, bool>
+struct ManaVoidSelector : public ACORE::unary_function<Unit*, bool>
{
explicit ManaVoidSelector(WorldObject const* source) : _source(source) { }
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index 30277670b8..b145150c5f 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -166,7 +166,7 @@ const Position PosPlatform = {2640.5f, -3360.6f, 285.26f, 0.0f};
#define IN_LIVE_SIDE(who) (who->GetPositionY() < POS_Y_GATE)
// Predicate function to check that the r efzr unit is NOT on the same side as the source.
-struct NotOnSameSide : public std::unary_function<Unit *, bool>
+struct NotOnSameSide : public ACORE::unary_function<Unit *, bool>
{
bool m_inLiveSide;
explicit NotOnSameSide(Unit *pSource) : m_inLiveSide(IN_LIVE_SIDE(pSource)) {}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 87089dccd2..c8f83f0d87 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -639,7 +639,7 @@ public:
// predicate function to select non main tank target
-class StoneGripTargetSelector : public std::unary_function<Unit*, bool>
+class StoneGripTargetSelector : public ACORE::unary_function<Unit*, bool>
{
public:
StoneGripTargetSelector(Creature* me, Unit const* victim) : _me(me), _victim(victim) {}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index d97a193037..f2e28245cb 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -49,7 +49,7 @@ enum Misc
EVENT_TALK_KILL = 10
};
-struct ShadowOfDeathSelector : public std::unary_function<Unit*, bool>
+struct ShadowOfDeathSelector : public ACORE::unary_function<Unit*, bool>
{
bool operator()(Unit const* target) const
{
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 3f9c25cc83..aa2324085d 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -86,7 +86,7 @@ enum Misc
EVENT_KILL_TALK = 100
};
-struct HammerOfJusticeSelector : public std::unary_function<Unit*, bool>
+struct HammerOfJusticeSelector : public ACORE::unary_function<Unit*, bool>
{
Unit const* _me;
HammerOfJusticeSelector(Unit* me) : _me(me) { }