Skip to content

Commit

Permalink
refactor: upgrade fmt
Browse files Browse the repository at this point in the history
This version introduces bugfixes and related api changes
  • Loading branch information
ivan-aksamentov committed Oct 25, 2021
1 parent 2045d06 commit fce4f8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cli11/1.9.1
cxxopts/2.2.1
date/3.0.1
fast-cpp-csv-parser/20191004
fmt/7.1.3
fmt/8.0.1
ghc-filesystem/1.4.0
gtest/1.10.0
jemalloc/5.2.1@local/stable
Expand Down
8 changes: 5 additions & 3 deletions packages/nextclade_common/src/datasets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ namespace Nextclade {
}

std::string formatDatasets(const std::vector<Dataset>& datasets, bool verbose /* = false */) {
fmt::memory_buffer buf;
fmt::memory_buffer bufRaw;
auto buf = std::back_inserter(bufRaw);

for (const auto& dataset : datasets) {
fmt::format_to(buf, "Dataset\n");
fmt::format_to(buf, "-------\n");
Expand All @@ -369,7 +371,7 @@ namespace Nextclade {

auto numRefs = std::to_string(dataset.datasetRefs.size());
fmt::format_to(buf, "Specific reference sequences ({:}):\n", numRefs);
fmt::format_to(buf, "-----------------------------" + std::string{"-", numRefs.size() + 3} + "\n\n");
// fmt::format_to(buf, "-----------------------------" + std::string{"-", numRefs.size() + 3} + "\n\n");

for (const auto& datasetRef : dataset.datasetRefs) {
const auto& ref = datasetRef.reference;
Expand Down Expand Up @@ -440,7 +442,7 @@ namespace Nextclade {
}
fmt::format_to(buf, "\n");
}
return fmt::to_string(buf);
return fmt::to_string(bufRaw);
}


Expand Down

0 comments on commit fce4f8d

Please sign in to comment.