mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-14 03:08:52 +08:00
Clang format
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
find ./include ./samples/ -type f \( -iname \*.cpp -o -iname \*.hpp \) | xargs clang-format -style="{ColumnLimit : 100}" -i
|
find ./include ./demo/ -type f \( -iname \*.cpp -o -iname \*.hpp \) | xargs clang-format -style="{ColumnLimit : 100}" -i
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ int main() {
|
|||||||
p.hide_percentage();
|
p.hide_percentage();
|
||||||
auto job = [&p]() {
|
auto job = [&p]() {
|
||||||
while (true) {
|
while (true) {
|
||||||
p.set_prefix_text("Reading package list... " +
|
p.set_prefix_text("Reading package list... " + std::to_string(p.current()) + "% ");
|
||||||
std::to_string(p.current()) + "% ");
|
|
||||||
if (p.current() + 2 >= 100)
|
if (p.current() + 2 >= 100)
|
||||||
p.set_prefix_text("Reading package list... Done");
|
p.set_prefix_text("Reading package list... Done");
|
||||||
p.tick();
|
p.tick();
|
||||||
@@ -108,15 +107,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
std::thread thread(job);
|
std::thread thread(job);
|
||||||
thread.join();
|
thread.join();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// PROGRESS BAR 4
|
// PROGRESS BAR 4
|
||||||
//
|
//
|
||||||
std::vector<std::string> lead_spinner{"⠋", "⠙", "⠹", "⠸", "⠼",
|
std::vector<std::string> lead_spinner{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"};
|
||||||
"⠴", "⠦", "⠧", "⠇", "⠏"};
|
|
||||||
indica::ProgressBar p4;
|
indica::ProgressBar p4;
|
||||||
p4.set_bar_width(40);
|
p4.set_bar_width(40);
|
||||||
p4.start_bar_with("");
|
p4.start_bar_with("");
|
||||||
@@ -186,7 +183,6 @@ int main() {
|
|||||||
std::thread thread(job);
|
std::thread thread(job);
|
||||||
thread.join();
|
thread.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -187,4 +187,4 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace indica
|
||||||
|
|||||||
@@ -156,4 +156,4 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace indica
|
||||||
|
|||||||
Reference in New Issue
Block a user