mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-19 07:20:25 +00:00
Fix two non-C++11isms when compiling with CAP_ROGUEVIZ.
Generic lambdas are C++14, and since we only have one in the whole codebase, let's just not do that. (Alternatively, I could replace -std=c++11 in the makefile with -std=c++14. I'd be okay with that personally.) "%Ld" is a typo for "%lld".
This commit is contained in:
parent
828f8c5c88
commit
f111c8b209
@ -607,10 +607,11 @@ void describe(cell *c) {
|
|||||||
help += "parameters:"; for(int k=0; k<cols; k++) help += " " + fts(n->net[k]);
|
help += "parameters:"; for(int k=0; k<cols; k++) help += " " + fts(n->net[k]);
|
||||||
help += ", u-matrix = " + fts(n->udist);
|
help += ", u-matrix = " + fts(n->udist);
|
||||||
help += "\n";
|
help += "\n";
|
||||||
vector<pair<double, int>> v;
|
using Pair = pair<double, int>;
|
||||||
|
vector<Pair> v;
|
||||||
for(int s=0; s<samples; s++) if(whowon[s] == n) v.emplace_back(vnorm(n->net, data[s].val), s);
|
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());
|
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(), [] (const Pair& a, const Pair& b) { return a.first < b.first; });
|
||||||
|
|
||||||
for(int i=0; i<size(v) && i<20; i++) {
|
for(int i=0; i<size(v) && i<20; i++) {
|
||||||
int s = v[i].second;
|
int s = v[i].second;
|
||||||
|
@ -1415,7 +1415,7 @@ void rvvideo(const char *fname) {
|
|||||||
reached = (2*reached-1) / 3;
|
reached = (2*reached-1) / 3;
|
||||||
else reached *= 2;
|
else reached *= 2;
|
||||||
}
|
}
|
||||||
printf("reached = %Ld\n", reached);
|
printf("reached = %lld\n", reached);
|
||||||
vector<string> seq;
|
vector<string> seq;
|
||||||
while(reached>1) {
|
while(reached>1) {
|
||||||
seq.push_back(llts(reached));
|
seq.push_back(llts(reached));
|
||||||
|
Loading…
Reference in New Issue
Block a user