Merge pull request #1627 from drewejohnson/fmt-msg-output

Delay formatting of some messages unless they're going to be printed
This commit is contained in:
Paul Romano 2020-08-06 14:22:06 -05:00 committed by GitHub
commit 1e61efe40e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 52 additions and 46 deletions

View file

@ -263,8 +263,7 @@ void initialize_source()
// Read the source from a binary file instead of sampling from some
// assumed source distribution
write_message(fmt::format("Reading source file from {}...",
settings::path_source), 6);
write_message(6, "Reading source file from {}...", settings::path_source);
// Open the binary file
hid_t file_id = file_open(settings::path_source, 'r', true);
@ -285,8 +284,7 @@ void initialize_source()
file_close(file_id);
} else if (!settings::path_source_library.empty()) {
write_message(fmt::format("Sampling from library source {}...",
settings::path_source), 6);
write_message(6, "Sampling library source {}...", settings::path_source);
fill_source_bank_custom_source();