diff options
author | Chun-Min Chang <[email protected]> | 2021-07-27 11:22:59 -0700 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2021-07-28 09:29:48 +1200 |
commit | f4ef497bbe74cac2af30de74e2a80fba9c0888f0 (patch) | |
tree | 6c650e3b40bde3105648987bf070b878337a53d6 /src/cubeb_utils_win.h | |
parent | e1456788c48c5ed6b55bc107a7342d63f2a08413 (diff) | |
download | cubeb-f4ef497bbe74cac2af30de74e2a80fba9c0888f0.tar.gz cubeb-f4ef497bbe74cac2af30de74e2a80fba9c0888f0.zip |
Run .clang-format
Format all the code under `include` and `src` except those files under
`src/speex` with style setting in `.clang-format` file by the following
script:
```sh
FILE_LIST="$(find "include" "src" -not -path "src/speex/*" | grep -E ".*(\.cpp|\.c|\.h|\.hpp|\.hh)$")"
echo "Files found to format:\n---\n$FILE_LIST\n---"
clang-format --verbose -i $FILE_LIST
```
Diffstat (limited to 'src/cubeb_utils_win.h')
-rw-r--r-- | src/cubeb_utils_win.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/cubeb_utils_win.h b/src/cubeb_utils_win.h index 0112ad6..4c47f45 100644 --- a/src/cubeb_utils_win.h +++ b/src/cubeb_utils_win.h @@ -8,26 +8,23 @@ #if !defined(CUBEB_UTILS_WIN) #define CUBEB_UTILS_WIN -#include <windows.h> #include "cubeb-internal.h" +#include <windows.h> /* This wraps a critical section to track the owner in debug mode, adapted from - NSPR and http://blogs.msdn.com/b/oldnewthing/archive/2013/07/12/10433554.aspx */ -class owned_critical_section -{ + NSPR and http://blogs.msdn.com/b/oldnewthing/archive/2013/07/12/10433554.aspx + */ +class owned_critical_section { public: owned_critical_section() #ifndef NDEBUG - : owner(0) + : owner(0) #endif { InitializeCriticalSection(&critical_section); } - ~owned_critical_section() - { - DeleteCriticalSection(&critical_section); - } + ~owned_critical_section() { DeleteCriticalSection(&critical_section); } void lock() { @@ -64,8 +61,8 @@ private: #endif // Disallow copy and assignment because CRICICAL_SECTION cannot be copied. - owned_critical_section(const owned_critical_section&); - owned_critical_section& operator=(const owned_critical_section&); + owned_critical_section(const owned_critical_section &); + owned_critical_section & operator=(const owned_critical_section &); }; #endif /* CUBEB_UTILS_WIN */ |