diff --git a/include/NiftyCounter.h b/include/NiftyCounter.h index 3b333c58f..d5b618407 100644 --- a/include/NiftyCounter.h +++ b/include/NiftyCounter.h @@ -12,6 +12,9 @@ #pragma once +namespace lmms +{ + /// Nifty counter, also known as "Schwarz Counter". Used for ensuring global /// static object initialization and destruction order. @@ -58,3 +61,5 @@ private: thread_local static int s_count; }; template thread_local int NiftyCounterTL::s_count = 0; + +} // namespace lmms diff --git a/include/libcds.h b/include/libcds.h index ac051ca00..91d418963 100644 --- a/include/libcds.h +++ b/include/libcds.h @@ -9,7 +9,7 @@ # include "mingw-std-threads/mutex" #endif -namespace _cdslib +namespace lmms::_cdslib { void init(); void deinit(); @@ -18,6 +18,6 @@ namespace _cdslib static NiftyCounter _counter; static thread_local NiftyCounterTL<_cdslib::thread_init, _cdslib::thread_deinit> _thread_counter; -} +} // namespace lmms:_cdslib -#define CDS_THREAD_GUARD() (void)_cdslib::_thread_counter; +#define CDS_THREAD_GUARD() (void)lmms::_cdslib::_thread_counter; diff --git a/src/core/libcds.cpp b/src/core/libcds.cpp index d727b3022..c019db334 100644 --- a/src/core/libcds.cpp +++ b/src/core/libcds.cpp @@ -4,7 +4,7 @@ #include -namespace _cdslib +namespace lmms::_cdslib { void init() @@ -31,4 +31,4 @@ void thread_deinit() } } -} +} // namespace lmms::_cdslib diff --git a/tests/scripted/check-namespace b/tests/scripted/check-namespace index a816f0d7b..3394e5838 100755 --- a/tests/scripted/check-namespace +++ b/tests/scripted/check-namespace @@ -55,7 +55,7 @@ if not Path('.gitmodules').is_file(): print('You need to call this script from the LMMS top directory') exit(1) -result = subprocess.run(['git', 'ls-files', '*.[ch]', '*.[ch]pp', ':!tests/*'], +result = subprocess.run(['git', 'ls-files', '*.[ch]', '*.[ch]pp', ':!tests/*', ':!benchmarks/*'], capture_output=True, text=True, check=True) known_no_namespace_lmms = {