mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Removed std::random_shuffle which was deprecated in C++14 and removed in C++17.
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <ctime>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
namespace BlackSample
|
namespace BlackSample
|
||||||
@@ -67,7 +68,7 @@ namespace BlackSample
|
|||||||
}
|
}
|
||||||
|
|
||||||
QStringList src { "a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3" };
|
QStringList src { "a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3" };
|
||||||
std::random_shuffle(src.begin(), src.end());
|
std::shuffle(src.begin(), src.end(), std::mt19937(static_cast<unsigned>(std::time(nullptr))));
|
||||||
qDebug() << src;
|
qDebug() << src;
|
||||||
qDebug() << "topologicallySortedInsert";
|
qDebug() << "topologicallySortedInsert";
|
||||||
QStringList dst;
|
QStringList dst;
|
||||||
|
|||||||
Reference in New Issue
Block a user