From: Mikko Rasa Date: Mon, 19 Dec 2022 10:02:34 +0000 (+0200) Subject: Add a few missing default initializers X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=af9f2e378f3adea7e636bac3c320ad2272af7612;p=libs%2Fcore.git Add a few missing default initializers --- diff --git a/source/core/refptr.h b/source/core/refptr.h index 79401dc..1a164c1 100644 --- a/source/core/refptr.h +++ b/source/core/refptr.h @@ -10,10 +10,8 @@ struct RefCounts KEEP = 1U<<(sizeof(unsigned)*8-1) }; - unsigned count; - unsigned weak_count; - - RefCounts(): count(0), weak_count(0) { } + unsigned count = 0; + unsigned weak_count = 0; }; template diff --git a/source/core/thread_private.h b/source/core/thread_private.h index 3c3b341..f133d60 100644 --- a/source/core/thread_private.h +++ b/source/core/thread_private.h @@ -8,9 +8,7 @@ namespace Msp { struct Thread::Private { - ThreadHandle handle; - - Private(): handle(0) { } + ThreadHandle handle = 0; static ThreadReturn THREAD_CALL main_wrapper(void *); };