feat(Core): enable C++17 (#2234)

Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
This commit is contained in:
Francesco Borzì
2019-09-02 08:54:10 +02:00
committed by Kargatum
parent cae91f1650
commit 3a43e8c415
28 changed files with 61 additions and 46 deletions

View File

@@ -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();