1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Bring that Whole New World to the Old Continent too

Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
Rémi Verschelde
2017-03-19 00:36:26 +01:00
parent 1d418afe86
commit f8db8a3faa
1308 changed files with 147754 additions and 174357 deletions

View File

@@ -34,7 +34,6 @@
void MutexPosix::lock() {
pthread_mutex_lock(&mutex);
}
void MutexPosix::unlock() {
@@ -42,32 +41,30 @@ void MutexPosix::unlock() {
}
Error MutexPosix::try_lock() {
return (pthread_mutex_trylock(&mutex)==0)?OK:ERR_BUSY;
return (pthread_mutex_trylock(&mutex) == 0) ? OK : ERR_BUSY;
}
Mutex *MutexPosix::create_func_posix(bool p_recursive) {
return memnew( MutexPosix(p_recursive) );
return memnew(MutexPosix(p_recursive));
}
void MutexPosix::make_default() {
create_func=create_func_posix;
create_func = create_func_posix;
}
MutexPosix::MutexPosix(bool p_recursive) {
pthread_mutexattr_init(&attr);
if (p_recursive)
pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&mutex,&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&mutex, &attr);
}
MutexPosix::~MutexPosix() {
pthread_mutex_destroy(&mutex);
}
#endif