Skip to content

Commit

Permalink
Fix unix build
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Feb 2, 2024
1 parent f9b81a9 commit d99cec0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cliprogressbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ static std::unique_ptr<ProgressBarType> create_progress_bar(int width, std::stri
option::End("]"),
option::FontStyles(std::vector<FontStyle>({FontStyle::bold})));

if constexpr (std::is_same_v<ProgressBarType, indicators::ProgressBar>) {
bar->set_option(option::Fill(fill));
bar->set_option(option::Lead(lead));
bar->set_option(option::Remainder(remainder));
}
#ifdef WIN32
bar->set_option(option::Fill(fill));
bar->set_option(option::Lead(lead));
bar->set_option(option::Remainder(remainder));
#else
(void)fill;
(void)lead;
(void)remainder;
#endif

return bar;
}
Expand Down

0 comments on commit d99cec0

Please sign in to comment.