mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-07 12:57:57 +00:00
Fix bugs and C++ compilance
- use 'noexcept' for constexpr - allocate dynamic array - enable CAP_TEXTURE on CAP_ROGUEVIZ
This commit is contained in:
@@ -139,7 +139,7 @@ void cellcoords() {
|
||||
// needs cellcoords/rvcoords/origcoords
|
||||
void build_disttable() {
|
||||
indenter_finish im("build_disttable");
|
||||
int tab[N];
|
||||
std::vector<int> tab(N);
|
||||
for(int i=0; i<N; i++) tab[i] = N;
|
||||
disttable0.clear();
|
||||
disttable1.clear();
|
||||
@@ -269,7 +269,7 @@ void writestats() {
|
||||
ld placement_loglik = loglik_placement();
|
||||
|
||||
for(int u=0; u<MAXDIST; u++) if(tally[u]) {
|
||||
println(hlog, format("* %4d: %8d / %12Ld = %lf %.10" PLDF " %.10" PLDF,
|
||||
println(hlog, format("* %4d: %8d / %12lld = %lf %.10" PLDF " %.10" PLDF,
|
||||
u, edgetally[u], tally[u], double(edgetally[u]) / tally[u],
|
||||
saved_logistic.yes(u), current_logistic.yes(u)));
|
||||
}
|
||||
@@ -338,7 +338,7 @@ void build_disttable_approx() {
|
||||
for(int k=0; k<threads; k++)
|
||||
v.emplace_back([&,k] () {
|
||||
auto& dt = results[k];
|
||||
int tab[N];
|
||||
std::vector<int> tab(N);
|
||||
for(int i=0; i<N; i++) tab[i] = N;
|
||||
auto p = k ? nullptr : new progressbar(N/threads, "build_disttable_approx");
|
||||
for(int i=k; i<N; i+=threads) {
|
||||
|
Reference in New Issue
Block a user