From f111c8b209d560899f4be994e49478eb659809eb Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Mon, 30 Oct 2017 17:14:32 -0700 Subject: [PATCH] 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". --- kohonen.cpp | 5 +++-- rogueviz.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kohonen.cpp b/kohonen.cpp index 2a4e9d81..342d3067 100644 --- a/kohonen.cpp +++ b/kohonen.cpp @@ -607,10 +607,11 @@ void describe(cell *c) { help += "parameters:"; for(int k=0; knet[k]); help += ", u-matrix = " + fts(n->udist); help += "\n"; - vector> v; + using Pair = pair; + vector v; for(int s=0; snet, 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(), [] (const Pair& a, const Pair& b) { return a.first < b.first; }); for(int i=0; i seq; while(reached>1) { seq.push_back(llts(reached));