diff options
| author | Rémi Verschelde | 2017-03-19 00:36:26 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-19 00:36:26 +0100 |
| commit | f8db8a3faa30b71dca33ced38be16d3f93f43e8a (patch) | |
| tree | 3b798318132cca7eccfbca5818ab55656a2896d7 /core/safe_refcount.cpp | |
| parent | 1d418afe863c9e553b69174ce63aef203c46d2f0 (diff) | |
| download | godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.tar.gz godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.tar.zst godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.zip | |
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
5dbf1809c6e3e905b94b8764e99491e608122261.
Diffstat (limited to 'core/safe_refcount.cpp')
| -rw-r--r-- | core/safe_refcount.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp index de6b688b8..4ef8a1e21 100644 --- a/core/safe_refcount.cpp +++ b/core/safe_refcount.cpp @@ -28,28 +28,26 @@ /*************************************************************************/ #include "safe_refcount.h" - #ifdef _MSC_VER // don't pollute my namespace! #include <windows.h> -long atomic_conditional_increment( register long * pw ) { +long atomic_conditional_increment(register long *pw) { /* try to increment until it actually works */ // taken from boost while (true) { - long tmp = static_cast< long const volatile& >( *pw ); - if( tmp == 0 ) - return 0; // if zero, can't add to it anymore - if( InterlockedCompareExchange( pw, tmp + 1, tmp ) == tmp ) - return tmp+1; + long tmp = static_cast<long const volatile &>(*pw); + if (tmp == 0) + return 0; // if zero, can't add to it anymore + if (InterlockedCompareExchange(pw, tmp + 1, tmp) == tmp) + return tmp + 1; } - } -long atomic_decrement( register long * pw ) { - return InterlockedDecrement( pw ); +long atomic_decrement(register long *pw) { + return InterlockedDecrement(pw); } #endif |
