city_generator2

Generated conformal 3D meshes representing a city
git clone git://git.meso-star.fr/city_generator2.git
Log | Files | Refs | README | LICENSE

commit 0b6e29a0b4ae3b211f8c2e67e524f9738ad1fcee
parent b99d592b6a45cc99cf3a17a0f6046f95fae77b4d
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri, 28 Apr 2023 10:29:32 +0200

Minor changes

Diffstat:
Msrc/cg_main.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cg_main.c b/src/cg_main.c @@ -93,7 +93,7 @@ int main struct parsed_city* parsed_city = NULL; struct parsed_catalog* parsed_catalog = NULL; struct catalog* catalog = NULL; - int keep, logger_initialized = 0, allocator_initialized = 0; + int logger_initialized = 0, allocator_initialized = 0; const struct cyaml_config config = { .log_fn = cg_log, .log_ctx = &logger, @@ -124,7 +124,6 @@ int main print_version(); goto exit; } - keep = args->keep_running_on_errors; /* Deactivate some logging according to the -V arg */ if(args->verbosity_level < 1) @@ -168,6 +167,7 @@ exit: release_city(city); release_catalog(catalog); if(logger_initialized) logger_release(&logger); + if(args) release_args(args); if(allocator_initialized) { if(check_memory_allocator(&allocator)) err = EXIT_FAILURE; mem_shutdown_proxy_allocator(&allocator); @@ -175,13 +175,13 @@ exit: } return err; error: - release_args(args); release_parsed_catalog(&config, parsed_catalog); release_parsed_city(&config, parsed_city); err = EXIT_FAILURE; if(logger_initialized) { logger_print(&logger, LOG_ERROR, "City generator failed.\n"); - if(!keep) logger_print(&logger, LOG_ERROR, "Try to re-run with option -k.\n"); + if(!city->keep_running_on_errors) + logger_print(&logger, LOG_ERROR, "Try to re-run with option -k.\n"); } goto exit; }