From af9f2e378f3adea7e636bac3c320ad2272af7612 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 19 Dec 2022 12:02:34 +0200 Subject: [PATCH] Add a few missing default initializers --- source/core/refptr.h | 6 ++---- source/core/thread_private.h | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) 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 *); }; -- 2.43.0