Fix progress variable type in sample code

This commit is contained in:
Rafał Lalik
2025-05-02 21:27:24 +02:00
parent fbdac646ee
commit 08bf7ec793

View File

@@ -14,10 +14,10 @@ int main() {
std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}}; std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}};
// Update bar state // Update bar state
auto progress = 0.0f; size_t progress = 0;
while (true) { while (true) {
bar.set_progress(progress); bar.set_progress(progress);
progress += 1; progress++;
if (bar.is_completed()) if (bar.is_completed())
break; break;
std::this_thread::sleep_for(std::chrono::milliseconds(50)); std::this_thread::sleep_for(std::chrono::milliseconds(50));