Run clang-format

This commit is contained in:
Bassem Girgis
2018-10-18 00:40:34 -05:00
parent fffe4528da
commit 31c32e368a
149 changed files with 5974 additions and 6287 deletions

View File

@@ -1,46 +1,47 @@
#include <thread>
void do_something(int& i)
void
do_something(int& i)
{
++i;
++i;
}
struct func
{
int& i;
struct func {
int& i;
func(int& i_):i(i_){}
func(int& i_) : i(i_) {}
void operator()()
{
for(unsigned j=0;j<1000000;++j)
{
do_something(i);
}
void operator()()
{
for (unsigned j = 0; j < 1000000; ++j) {
do_something(i);
}
}
};
void do_something_in_current_thread()
{}
void f()
void
do_something_in_current_thread()
{
int some_local_state=0;
func my_func(some_local_state);
std::thread t(my_func);
try
{
do_something_in_current_thread();
}
catch(...)
{
t.join();
throw;
}
}
void
f()
{
int some_local_state = 0;
func my_func(some_local_state);
std::thread t(my_func);
try {
do_something_in_current_thread();
}
catch (...) {
t.join();
throw;
}
t.join();
}
int main()
int
main()
{
f();
f();
}