Sanity check for trail

sql-rework
Tomasz Golinski 2020-02-23 03:52:30 +01:00
rodzic 8e0909a64c
commit c2532a181e
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -311,9 +311,13 @@ int main(int argc, char** argv) {
std::exit(EXIT_FAILURE);
}
Heat hmap(chosen_map);
if (trail)
if (trail) {
if (sorted_fcaches.size() < 2) {
std::cout << "You need at least 2 caches for a trail.\n";
std::exit(EXIT_FAILURE);
}
hmap.generate_path(heat_file, sorted_fcaches);
else
} else
hmap.generate(heat_file, fcc, heat_stamp_size, (heat_exp == 1 ? "exp" : "soft"));
std::cout << "<img class=\"heatmap\" src=\"" << heat_file << "\" alt=\"heat map\">\n";
}