summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scene/main/node.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/main/node.h b/scene/main/node.h
index 4d4e71ee56..4253928427 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -52,13 +52,17 @@ protected:
// During group processing, these are thread-safe.
// Outside group processing, these avoid the cost of sync by working as plain primitive types.
union MTFlag {
- SafeFlag mt{};
+ SafeFlag mt;
bool st;
+ MTFlag() :
+ mt{} {}
};
template <class T>
union MTNumeric {
- SafeNumeric<T> mt{};
+ SafeNumeric<T> mt;
T st;
+ MTNumeric() :
+ mt{} {}
};
public: