From 5dbf1809c6e3e905b94b8764e99491e608122261 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Sun, 5 Mar 2017 16:44:50 +0100 Subject: 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 --- drivers/windows/rw_lock_windows.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'drivers/windows/rw_lock_windows.cpp') 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 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 -- cgit v1.2.3-70-g09d2