diff options
Diffstat (limited to 'src/libs/7zip/unix/CPP/Windows/Synchronization.h')
-rw-r--r-- | src/libs/7zip/unix/CPP/Windows/Synchronization.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/7zip/unix/CPP/Windows/Synchronization.h b/src/libs/7zip/unix/CPP/Windows/Synchronization.h index df3c693a7..1c45a1b78 100644 --- a/src/libs/7zip/unix/CPP/Windows/Synchronization.h +++ b/src/libs/7zip/unix/CPP/Windows/Synchronization.h @@ -5,8 +5,8 @@ #include "Defs.h" -extern "C" -{ +extern "C" +{ #include "../../C/Threads.h" } @@ -18,7 +18,7 @@ namespace NWindows { namespace NSynchronization { class Uncopyable { -protected: +protected: Uncopyable() {} // allow construction ~Uncopyable() {} // and destruction of derived objects... private: @@ -125,8 +125,8 @@ public: return 0; return ::GetLastError(); } - WRes Release() - { + WRes Release() + { return ::ReleaseMutex(_handle) ? 0 : ::GetLastError(); } }; @@ -134,7 +134,7 @@ class CMutexLock { CMutex *_object; public: - CMutexLock(CMutex &object): _object(&object) { _object->Lock(); } + CMutexLock(CMutex &object): _object(&object) { _object->Lock(); } ~CMutexLock() { _object->Release(); } }; #endif @@ -173,7 +173,7 @@ class CCriticalSectionLock : private Uncopyable CCriticalSection *_object; void Unlock() { _object->Leave(); } public: - CCriticalSectionLock(CCriticalSection &object): _object(&object) {_object->Enter(); } + CCriticalSectionLock(CCriticalSection &object): _object(&object) {_object->Enter(); } ~CCriticalSectionLock() { Unlock(); } }; |