Run clang-format
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
#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 oops()
|
||||
void
|
||||
oops()
|
||||
{
|
||||
int some_local_state=0;
|
||||
func my_func(some_local_state);
|
||||
std::thread my_thread(my_func);
|
||||
my_thread.detach();
|
||||
int some_local_state = 0;
|
||||
func my_func(some_local_state);
|
||||
std::thread my_thread(my_func);
|
||||
my_thread.detach();
|
||||
}
|
||||
|
||||
int main()
|
||||
int
|
||||
main()
|
||||
{
|
||||
oops();
|
||||
oops();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user