Clang format

This commit is contained in:
Pranav Srinivas KumaR
2019-12-04 20:59:51 -06:00
parent 7a5c9fd48d
commit 9f8cd55762
5 changed files with 181 additions and 185 deletions

View File

@@ -1,2 +1,2 @@
#!/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

View File

@@ -61,8 +61,7 @@ int main() {
p.hide_percentage();
auto job = [&p]() {
while (true) {
p.set_prefix_text("Reading package list... " +
std::to_string(p.current()) + "% ");
p.set_prefix_text("Reading package list... " + std::to_string(p.current()) + "% ");
if (p.current() + 2 >= 100)
p.set_prefix_text("Reading package list... Done");
p.tick();
@@ -108,15 +107,13 @@ int main() {
};
std::thread thread(job);
thread.join();
}
{
//
// PROGRESS BAR 4
//
std::vector<std::string> lead_spinner{"", "", "", "", "",
"", "", "", "", ""};
std::vector<std::string> lead_spinner{"", "", "", "", "", "", "", "", "", ""};
indica::ProgressBar p4;
p4.set_bar_width(40);
p4.start_bar_with("");
@@ -186,7 +183,6 @@ int main() {
std::thread thread(job);
thread.join();
}
}
{

View File

@@ -28,5 +28,5 @@ SOFTWARE.
#include <indica/termcolor.hpp>
namespace indica {
enum class Color { GREY, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE };
enum class Color { GREY, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE };
}

View File

@@ -187,4 +187,4 @@ private:
}
};
}
} // namespace indica

View File

@@ -90,7 +90,7 @@ public:
_print_progress();
}
void set_spinner_states(const std::vector<std::string>& states) {
void set_spinner_states(const std::vector<std::string> &states) {
std::unique_lock<std::mutex> lock{_mutex};
_states = states;
}
@@ -156,4 +156,4 @@ private:
}
};
}
} // namespace indica