all: more assorted cleanups; NFCI

This commit is contained in:
Markus F.X.J. Oberhumer
2024-02-02 10:17:16 +01:00
parent d429801498
commit 718ec468ff
26 changed files with 307 additions and 125 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ std::mutex opt_lock_mutex;
**************************************************************************/
void Options::reset() noexcept {
#define opt ERROR_DO_NOT_USE_opt // protect against using the wrong variable
#define opt ERROR_DO_NOT_USE_opt // self-protect against using the wrong variable
Options *const o = this;
mem_clear(o);
o->crp.reset();
@@ -90,7 +90,7 @@ void Options::reset() noexcept {
**************************************************************************/
TEST_CASE("Options::reset") {
#define opt ERROR_DO_NOT_USE_opt // protect against using the wrong variable
#define opt ERROR_DO_NOT_USE_opt // self-protect against using the wrong variable
COMPILE_TIME_ASSERT(std::is_standard_layout<Options>::value)
COMPILE_TIME_ASSERT(std::is_nothrow_default_constructible<Options>::value)
COMPILE_TIME_ASSERT(std::is_trivially_copyable<Options>::value)