Permalink
Browse files

fix for C++17

  • Loading branch information...
MasterBel2
MasterBel2 committed Sep 6, 2018
1 parent e19d4b8 commit 60bd46e5ade38ba051b70279895bd19842695f63
Showing with 7 additions and 1 deletion.
  1. +6 −1 src/spring.cpp
  2. +1 −0 src/updatehelper.cpp
@@ -29,6 +29,9 @@ lsl/spring/spring.cpp
#include <fstream>
#include <stdexcept>
#include <vector>
#include <random>
#include <algorithm>
#include <cerrno>

#include "gui/customdialogs.h"
#include "gui/mainwindow.h"
@@ -267,7 +270,9 @@ std::string Spring::WriteScriptTxt(IBattle& battle) const
remap_positions = std::vector<LSL::StartPos>(infos.positions.begin(), infos.positions.begin() + copysize); // only add the first x positions

if (startpostype == IBattle::ST_Random) {
std::random_shuffle(remap_positions.begin(), remap_positions.end()); // shuffle the positions
std::random_device seed;
std::mt19937 rng(seed());
std::shuffle(remap_positions.begin(), remap_positions.end(), rng); // shuffle the positions
}
}
if (battle.IsProxy()) {
@@ -3,6 +3,7 @@
#include "updatehelper.h"

#include <time.h>
#include <cerrno>

#include "httpfile.h"
#include "utils/conversion.h"

0 comments on commit 60bd46e

Please sign in to comment.