diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /drivers/windows/rw_lock_windows.cpp | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'drivers/windows/rw_lock_windows.cpp')
| -rw-r--r-- | drivers/windows/rw_lock_windows.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/windows/rw_lock_windows.cpp b/drivers/windows/rw_lock_windows.cpp index edbd7b6a0..615bcd22a 100644 --- a/drivers/windows/rw_lock_windows.cpp +++ b/drivers/windows/rw_lock_windows.cpp @@ -30,14 +30,13 @@ #include "rw_lock_windows.h" -#include "os/memory.h" #include "error_macros.h" +#include "os/memory.h" #include <stdio.h> void RWLockWindows::read_lock() { AcquireSRWLockShared(&lock); - } void RWLockWindows::read_unlock() { @@ -47,18 +46,16 @@ void RWLockWindows::read_unlock() { Error RWLockWindows::read_try_lock() { - if (TryAcquireSRWLockShared(&lock)==0) { + if (TryAcquireSRWLockShared(&lock) == 0) { return ERR_BUSY; } else { return OK; } - } void RWLockWindows::write_lock() { AcquireSRWLockExclusive(&lock); - } void RWLockWindows::write_unlock() { @@ -67,34 +64,29 @@ void RWLockWindows::write_unlock() { } Error RWLockWindows::write_try_lock() { - if (TryAcquireSRWLockExclusive(&lock)==0) { + if (TryAcquireSRWLockExclusive(&lock) == 0) { return ERR_BUSY; } else { return OK; } } - RWLock *RWLockWindows::create_func_windows() { - return memnew( RWLockWindows ); + return memnew(RWLockWindows); } void RWLockWindows::make_default() { - create_func=create_func_windows; + create_func = create_func_windows; } - RWLockWindows::RWLockWindows() { InitializeSRWLock(&lock); } - RWLockWindows::~RWLockWindows() { - - } #endif |
