]> git.tdb.fi Git - libs/core.git/commitdiff
Add a few missing default initializers
authorMikko Rasa <tdb@tdb.fi>
Mon, 19 Dec 2022 10:02:34 +0000 (12:02 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 19 Dec 2022 10:02:34 +0000 (12:02 +0200)
source/core/refptr.h
source/core/thread_private.h

index 79401dce5be40094a9f55212c0c3fb4abd8f7dc9..1a164c1a90eafe69d3eab755b971400ff1f3e275 100644 (file)
@@ -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<typename T>
index 3c3b341565d4b1dcd12e085d6a4506d9b2ee74de..f133d6025fcb41e4f30c8b9ed35e62edbd35991a 100644 (file)
@@ -8,9 +8,7 @@ namespace Msp {
 
 struct Thread::Private
 {
-       ThreadHandle handle;
-
-       Private(): handle(0) { }
+       ThreadHandle handle = 0;
 
        static ThreadReturn THREAD_CALL main_wrapper(void *);
 };