Skip to content

Commit

Permalink
Fix: Seemingly MSVC isn't happy about casting filesystem::paths to st…
Browse files Browse the repository at this point in the history
…rings
  • Loading branch information
alexdewar committed Aug 9, 2023
1 parent 98ccfea commit 0e35a28
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/HealthGPS.Console/model_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ namespace host {

hgps::BaselineAdjustment load_baseline_adjustments(const poco::BaselineInfo &info) {
MEASURE_FUNCTION();
auto &male_filename = info.file_names.at("factorsmean_male");
auto &female_filename = info.file_names.at("factorsmean_female");
const auto male_filename = info.file_names.at("factorsmean_male").string();
const auto female_filename = info.file_names.at("factorsmean_female").string();

try {

if (hgps::core::case_insensitive::equals(info.format, "CSV")) {
auto data = std::map<hgps::core::Gender,
std::map<hgps::core::Identifier, std::vector<double>>>{};
Expand All @@ -38,7 +37,7 @@ hgps::BaselineAdjustment load_baseline_adjustments(const poco::BaselineInfo &inf
}
} catch (const std::exception &ex) {
fmt::print(fg(fmt::color::red), "Failed to parse adjustment file: {} or {}. {}\n",
male_filename.string(), female_filename.string(), ex.what());
male_filename, female_filename, ex.what());
throw;
}
}
Expand Down

0 comments on commit 0e35a28

Please sign in to comment.