kopia lustrzana https://gitlab.com/tomaszg/geostat
Fix the counter for the tables broken a few commits ago
rodzic
2eb70a95dc
commit
8add963fed
|
@ -429,6 +429,7 @@ int main(int argc, char** argv) {
|
|||
show_histogram(cc, &Cache::year, "Years", 1, 0);
|
||||
|
||||
// DT matrix
|
||||
n = 0;
|
||||
|
||||
std::cout << "<h2>Difficulty / terrain matrix</h2>\n";
|
||||
std::cout << "<table class=\"dt\">\n";
|
||||
|
@ -444,8 +445,10 @@ int main(int argc, char** argv) {
|
|||
count = std::count_if(cc.begin(), cc.end(), [i, j](Cache c) { return (c.diff == i / 2.0 && c.terr == j / 2.0); });
|
||||
if (count == 0)
|
||||
std::cout << "<td class=\"dt_zero\">" << 0 << "</td>";
|
||||
else
|
||||
else {
|
||||
std::cout << "<td>" << count << "</td>";
|
||||
n++;
|
||||
}
|
||||
}
|
||||
std::cout << "</tr>\n";
|
||||
}
|
||||
|
@ -475,8 +478,10 @@ int main(int argc, char** argv) {
|
|||
std::cout << "<td class=\"dt_null\"></td>";
|
||||
else
|
||||
std::cout << "<td class=\"dt_zero\">" << 0 << "</td>";
|
||||
} else
|
||||
} else {
|
||||
std::cout << "<td>" << count << "</td>";
|
||||
n++;
|
||||
}
|
||||
}
|
||||
std::cout << "</tr>\n";
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue