1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

back to C++11

This commit is contained in:
Zeno Rogue 2017-09-30 11:47:00 +02:00
parent fe34a4a555
commit 58133a2761

View File

@ -610,7 +610,7 @@ void describe(cell *c) {
vector<pair<double, int>> v;
for(int s=0; s<samples; s++) if(whowon[s] == n) v.emplace_back(vnorm(n->net, data[s].val), s);
random_shuffle(v.begin(), v.end());
sort(v.begin(), v.end(), [] (auto a, auto b) { return a.first < b.first; });
sort(v.begin(), v.end(), [] (pair<double,int> a, pair<double,int> b) { return a.first < b.first; });
for(int i=0; i<size(v) && i<20; i++) {
int s = v[i].second;