From 8e15d95be64bff850bc248b6056d2326ca4aa85d Mon Sep 17 00:00:00 2001 From: Tomasz Golinski Date: Sun, 29 Mar 2020 19:03:48 +0200 Subject: [PATCH] Fix geostat_cli output with -N --- geostat_cli.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/geostat_cli.cpp b/geostat_cli.cpp index 811ea6d..9690a64 100644 --- a/geostat_cli.cpp +++ b/geostat_cli.cpp @@ -283,12 +283,12 @@ int main(int argc, char** argv) { hmap.generate(heat_file, fcc, heat_stamp_size, (heat_exp == 1 ? "exp" : "soft")); } - if (show_list) { - for (auto el : sorted_caches) - el.second->show(); - } - if (!get_not_found) { + if (show_list) { + for (auto el : sorted_caches) + el.second->show(); + } + if (show_minmax) { auto N = *std::max_element(fcc.begin(), fcc.end(), [&](const Cache* a, const Cache* b) { return a->pos.lat < b->pos.lat; }); auto S = *std::min_element(fcc.begin(), fcc.end(), [&](const Cache* a, const Cache* b) { return a->pos.lat < b->pos.lat; }); @@ -350,5 +350,10 @@ int main(int argc, char** argv) { std::cout << '\n'; } } + } else { + if (show_list) { + for (auto el : cc) + el.show(); + } } }